lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Ricci <>
Subject RE: DateField issues
Date Thu, 13 Jun 2002 13:32:14 GMT

I found that RangeQuery works fine with the dates. I always felt that the
DateFilter could be slow on a large file. If you think about it, it should
be fine so long as you normalize the data your putting into the high/low
terms of the RangeQuery. I also made this work with numeric fields as well.


-----Original Message-----
From: Nader S. Henein []
Sent: Thursday, June 13, 2002 9:29 AM
Subject: DateField issues 

I managed to index according to the date field no problem, but then
when I search using a date filter, the search is slightly slower and
the results do not seem to be constraint by any date.

The following code segment shows how I'm searching :
(I basically want all the records indexed with dates after "start" )

// Current time in mills
long currInMills = DateField.MAX_DATE_STRING();
// startTime = currInMills - ( a number of days * ( length of a day in
mills) )
long start = currInMills - ( freshness * dayInMillis ) ;

Query query = QueryParser.parse(queryString, "title" , new
filter = new DateFilter.After("datemodified", start)  ;
Searcher searcher = new IndexSearcher(indexPath);
Hits hits =,filter);

I know I'm indexing the dates correctly because I encode them then I decode
them and print them
and they seem to be accurate, just to be sure time in mills is measured
since 01 01 1970 right ?

if anyone has any idea why this isn't working please feel free to contribute
, oh and if you're wondering
yes I also tried the date filter with start and end .. nada

Nader S. Henein , Dubai Internet City
Tel. +9714 3911900
Fax. +9714 3911915
GSM. +9715 05659557

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message