lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: Range Query Assistance
Date Wed, 21 Apr 2010 13:11:24 GMT
Joseph,

If you can, get the latest Lucene and use NumericField to index your dates with appropriate
precision and then use NumericRangeQueries when searching.  This will be faster than searching
for string dates in a given range.
 Otis
----
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch
Lucene ecosystem search :: http://search-lucene.com/



----- Original Message ----
> From: "info@josephcrawford.com" <info@josephcrawford.com>
> To: java-user@lucene.apache.org
> Sent: Fri, April 16, 2010 9:23:30 AM
> Subject: Range Query Assistance
> 
> Hello,

I would like to query based on a start and end date.  I was 
> thinking
something like this

start_date: [20000101 TO <todays 
> date>] end_date: [<todays date> TO
20900101]

Would this work 
> for me?  Our dates are stored in the index as strings so I
am not sure 
> the syntax above would be correct.

Any assistance would be 
> appreciated.

Thanks,
Joseph 
> Crawford

---------------------------------------------------------------------
To 
> unsubscribe, e-mail: 
> href="mailto:java-user-unsubscribe@lucene.apache.org">java-user-unsubscribe@lucene.apache.org
For 
> additional commands, e-mail: 
> ymailto="mailto:java-user-help@lucene.apache.org" 
> href="mailto:java-user-help@lucene.apache.org">java-user-help@lucene.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message