lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: Sorting on dates using long
Date Thu, 05 Oct 2006 15:06:29 GMT
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


Mime
View raw message