Well, you could always index the year/month/day separately. The query
might be a bit slower and more cumbersome, but it is doable. And for
indexing, you can probably use index-time transformers/components to
split the date into the parts behind the scenes.

The usual other option is to use Date Math, but I don't think it fits
your requirements.
http://lucene.apache.org/solr/api-4_0_0-BETA/org/apache/solr/util/DateMathParser.html

Regards,
   Alex.
Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all
at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
book)


On Thu, Sep 13, 2012 at 9:03 AM, Alex Cougarman <acoug...@bwc.org> wrote:
> Hi. We're using Solr 4.0Beta and wondered how we can perform partial date 
> searches. For example, we have this date stored in the index:
>
>    <date name="my_date">2010-05-12T00:00:00Z</date>
>
> The user may want to search on all documents from 05-12 without providing the 
> year. Or the user may want to search on 2010-xx-12 where the day isn't known 
> but the month and year are known. Is this possible? Is there a sample search 
> we can run in the admin interface against our index? Thanks.
>
> Warm regards,
> Alex Cougarman
>
> Bahá'í World Centre
> Haifa, Israel
> Office: +972-4-835-8683
> Cell: +972-54-241-4742
> acoug...@bwc.org
>

Reply via email to