lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Vasiliev <art...@gmail.com>
Subject Re[4]: OutOfMemory with search(Query, Sort)
Date Wed, 05 Apr 2006 05:46:12 GMT
>>I tried to
>> sort by filePath field which can be 100 bytes at average meaning 400M
>> RAM for the cache

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

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

The int[] array here contains references to String[] and to populate
it still all the field values need to be loaded and compared/sorted
which is what I want to avoid. I guess my option is not to use
FieldCache at all.

-- 
Best regards,
 Artem

http://sharehound.sourceforge.net sharehound, the open source filesystems indexer


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