lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <>
Subject Re: Inconsistent Search Speed
Date Wed, 27 Feb 2008 12:33:54 GMT
You could also look at the FieldSelector when getting the Document.   
Such that you only load the one field you need


On Feb 26, 2008, at 10:13 PM, Mark Miller wrote:

> The Lucene prime directive: dont iterate through all of Hits! Its  
> horribly inefficient. You must use a hitcollector. Even still,  
> getting your field values will be slow no matter what if you get for  
> every hit. You don't want to do this for every hit in a search. But  
> don't loop through Hits.
> fangz wrote:
>> Thank you for the info.  It makes sense.
>> My search will return more than 10000 documents and I have to loop  
>> through
>> all documents to build a list with unique field values. It seems  
>> that the
>> looping of the hits takes the longest time in the initial run but  
>> afterwards
>> it becomes much faster. If the hits are relatively small, I do not  
>> see the
>> same behavior.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Grant Ingersoll
Next Training: April 7, 2008 at ApacheCon Europe in Amsterdam

Lucene Helpful Hints:

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

View raw message