You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ben <ne...@gmail.com> on 2005/02/21 16:34:14 UTC

Sorting isn't working for my date field

Hi

Do I need to store and index the field I want to sort? Currently I am
only indexing the field without storing nor tokenizing it.

I have a date field indexing as yyyyMMdd and I have two documents with
the same date. When I do my search with:

searcher.search(query, new SortField("date", true));
searcher.search(query, new SortField("date", false));

they both return the same order.

Any idea? Thanks.

Ben

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