lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: Large scale sorting
Date Tue, 10 Apr 2007 00:29:30 GMT
On 4/9/07, jian chen <> wrote:
> But, on a higher level, my idea is really just to create an array of
> integers for each sort field. The array length is NumOfDocs in the index.
> Each integer corresponds to a displayable string value. For example, if you
> have a field of different colors, you can assign integers like this:
> 0 <=> whilte
> 1 <=> blue
> 2 <=> yellow
> ...
> Thus, you don't need to use strings for sorting.

This is how it is currently done.  Sorting using an IndexSearcher does
not do string comparisons at all, but just compares their ordinal
retrieved from an int[]

A memory saving optimization would be to not load the corresponding
String[] in the string index (as discussed previously), but there is
currently no way to tell the FieldCachethat the strings are unneeded.
The String values are only needed for merging results in a


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

View raw message