lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Monsur Hossain" <mon...@monsur.com>
Subject RE: Sorting: string vs int
Date Thu, 10 Nov 2005 19:13:15 GMT

Ah, I got it.  retArray is an array of ints; in order to return the string
value, it needs the mterms array to do the mapping.  Thanks, Yonik!

Monsur


 

> -----Original Message-----
> From: Yonik Seeley [mailto:yseeley@gmail.com] 
> Sent: Thursday, November 10, 2005 1:33 PM
> To: java-user@lucene.apache.org
> Subject: Re: Sorting: string vs int
> 
> Here is a snippet of the current StringIndex class:
> 
> public static class StringIndex {
>     /** All the term values, in natural order. */
>     public final String[] lookup;
> 
>     /** For each document, an index into the lookup array. */
>     public final int[] order;
>  }
> 
> The order field is used for sorting within a single IndexSearcher, but
> the lookup field is needed to populate the actual string value so it
> may be used by MultiSearchers to order hits from multiple Searchers.
> 
> Look at FieldSortedHitQueue.comparatorString() for more info.
> 
> I guess it would be nice to have some way of telling the searcher (and
> the fieldcache) whether the actual string values are needed or not...
> it could save a lot of memory when there are a lot of unique terms.
> 
> -Yonik
> Now hiring -- http://forms.cnet.com/slink?231706



---------------------------------------------------------------------
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