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


On 11/10/05, Monsur Hossain <[EMAIL PROTECTED]> wrote:
>
> Thanks Yonik, it makes sense now.  So getStringIndex indexes every sorted
> string field in the retArray (one per document), and then each unique string
> term in the mterms array.  What is the purpose of the mterms array?
>
> Thanks,
> Monsur

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to