lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Björn Ekengren <bjorn.ekeng...@avanza.se>
Subject RE: Sorting on dates using long
Date Fri, 06 Oct 2006 08:38:05 GMT
I changed to RangeFilter and now everything works fine. I havn't noticed any change in performance
so I'm happy. Strange with the constantrangequery though...

-----Original Message-----
From: yseeley@gmail.com [mailto:yseeley@gmail.com]On Behalf Of Yonik
Seeley
Sent: den 5 oktober 2006 17:06
To: java-user@lucene.apache.org
Subject: Re: Sorting on dates using long

On 10/5/06, Björn Ekengren <bjorn.ekengren@avanza.se> wrote:
> I am trying to get sort by date to work. The dates are of form yyyyMMddhhmm and it seems
that sort sees them as Integers and discards the last four numbers since an integer isn't
large enough. I tried using SortField.STRING instead but then constantrangequery breaks (date:[200501010101
TO 200601010101] returns 0 hits).

Using SortField.STRING should work, both with sorting and range
queries via RangeFilter or ConstantScoreRangeQuery.


-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: 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