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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]