lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: Partial date searches
Date Thu, 13 Sep 2012 13:47:00 GMT
Wildcard patterns work on dates if they are "string" fields.

If your dates are "trie" dates (the default "date" field type now), you 
would need to do a copyField to a string field to do the wildcard match.



-- Jack Krupansky

-----Original Message----- 
From: Alex Cougarman
Sent: Thursday, September 13, 2012 9:03 AM
Subject: Partial date searches

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 

View raw message