Hi,
I have a question about using sorting in Lucene, because we experienced
some OutOfMemory errors. If I understand it correctly, each unique term
in a field is read into a cache, when I use Searcher.search(Query query,
Sort sort) with one SortField. So even if my query only finds 5
documents, Lucene would start to build a cache of maybe a few millionen
unique field entries, which would then be re-used for a further queries.
Is this correct? It would probably be best practice, to do sorting
yourself, if many unique terms are concerned for only a few search
results, especially since we have lots of index updates, which makes
reusing IndexSearcher a little lot harder.
Thanks in advance,
Tom