lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: Re[2]: OutOfMemory with search(Query, Sort)
Date Sat, 01 Apr 2006 14:15:11 GMT
On 4/1/06, Artem Vasiliev <artvas@gmail.com> 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
http://incubator.apache.org/solr Solr, The Open Source Lucene Search Server

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