lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rasik Pandey" <>
Subject RE : New Sorting Classes
Date Wed, 05 May 2004 10:14:13 GMT
Hello Tim,

> yes, I think you're right - there should be a way to specify
> the Locale in
> the SortField somehow.
> What about something like:
>   public SortField (String field, Locale locale, boolean
> reverse);
> Where the given field contains Strings in the given Locale.

Sound good! Ok, so the assumption is that if you construct a SortField with a Locale that
the sorting  "SortField.type" will be set to "SortField.STRING". 

I haven't seen any documentation regarding your sorting contributions but I think a good point
to add to any such documentation would be the default "SortField.type"="SortField.AUTO" should
be *avoided* to save cycles by indicating a concrete type for field value sorting, since in
FieldSortedHitQueue.determineComparator an IndexReader is used to a Term lookup for the field
from which only the first term is used to.
> This, then, would propagate down to the StringSortedHitQueue,
> etc.

Since this constructor exists:

SortField (String field, SortComparatorSource comparator)

I assume you intend to also propagate the Locale addition to the inteface SortComparatorSource.newComparator?

Your sorting contribution to Lucene it is very nicely done, thanks!


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

View raw message