lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: Re[2]: OutOfMemory with search(Query, Sort)
Date Sat, 01 Apr 2006 14:15:11 GMT
On 4/1/06, Artem Vasiliev <> wrote:
>I tried to
> sort by filePath field which can be 100 bytes at average meaning 400M
> RAM for the cache

Well, it's probably not quite that bad...

For string sorting, a FieldCache.StringIndex is used.
It contains a sorted String[num_unique_terms_in_field], and an int[maxDoc]
So if 10 documents share a large string field value, that value will
only be in the fieldCache once.

If you are just using an IndexSearcher (no multisearchers), then the
String[] isn't strictly needed... only the ordering (the int[]) is
needed from the StringIndex.  One option is to create your own
FieldCache that doesn't create/store that String[].

-Yonik Solr, The Open Source Lucene Search Server

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

View raw message