lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Help: About performance of search with sorting.
Date Tue, 20 Dec 2011 18:47:55 GMT
What are you specifying for your sort criteria? And what kind of field
is it we're talking
about here?


On Tue, Dec 20, 2011 at 8:45 AM, Qiurun <> wrote:
> Dear all,
> I select some of docs that meet some criteria by using TopDocs search(Query query, int
n). Also It's easy to select the docs that meet some query and sort by some field by using
TopFieldDocs search(Query query, int n, Sort sort). As known, Lucene use field cache when
sorting results by field values. According to Lucene in action (second editon), "The first
time the field cache is accessed for a given reader and field, the values for all documents
are visited and loaded into memory as a single large array, and recorded into an internal
cache keyed on the reader instance and the field name.  This process can be quite time consuming,
for a large index.", "FieldCache does not clear its entries until you close your reader and
remove all references to that reader from your application."
> Now we have an index with about 200 millions docs in it. However, we can not find the
obvious performance difference between the two ways. And I want to know why, thanks for your
> (We are using Lucene 3.2.0 and java version 1.6.0_26 on SuSe Linux Enterprise Server
10 sp2.)
> Best,
> Qiu Run
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message