What are you specifying for your sort criteria? And what kind of field
is it we're talking
about here?

Best
Erick

On Tue, Dec 20, 2011 at 8:45 AM, Qiurun <qiu...@huawei.com> 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 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-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to