lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qiurun <qiu...@huawei.com>
Subject Help: About performance of search with sorting.
Date Tue, 20 Dec 2011 13:45:45 GMT
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 advice.

(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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message