Re: Inconsistent Search Speed

2008-02-28 Thread Daniel Noll
On Thursday 28 February 2008 01:52:27 Erick Erickson wrote: > And don't iterate through the Hits object for more than 100 or so hits. > Like Mark said. Really. Really don't ... Is there a good trick for avoiding this? Say you have a situation like this... - User searches - User sees first N h

Re: Inconsistent Search Speed

2008-02-27 Thread Grant Ingersoll
... Thank you again! fangz -- View this message in context: http://www.nabble.com/Inconsistent-Search-Speed-tp15698325p15719770.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [

Re: Inconsistent Search Speed

2008-02-27 Thread fangz
score ) { TermFreqVector vector = null; vector = searcher.getIndexReader().getTermFreqVector(doc, "field"); ... Thank you again! fangz -- View this message in context: http://www.nabble.com/Inconsistent-Search-Speed-tp15698325p15719770.html Sent from the Lucene - Java Users mailing

Re: Inconsistent Search Speed

2008-02-27 Thread Erick Erickson
To reinforce Grant's comment, lazy loading improved one situation for me on the order of 10X. I wrote it up and it's somewhere in the Wiki. Your results will vary, and unless you have a LOT of stored fields I wouldn't necessarily expect a similar speedup, but it's sure worth looking at. And don't

Re: Inconsistent Search Speed

2008-02-27 Thread Grant Ingersoll
You could also look at the FieldSelector when getting the Document. Such that you only load the one field you need -Grant 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. Ev

Re: Inconsistent Search Speed

2008-02-26 Thread Mark Miller
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. fa

Re: Inconsistent Search Speed

2008-02-26 Thread fangz
the hits are relatively small, I do not see the same behavior. -- View this message in context: http://www.nabble.com/Inconsistent-Search-Speed-tp15698325p15704908.html Sent from the Lucene - Java Users mailing list archive at Nabble.com

Re: Inconsistent Search Speed

2008-02-26 Thread h t
sing such a > big speed difference? > > Thank you in advance! > > fangz > > -- > View this message in context: > http://www.nabble.com/Inconsistent-Search-Speed-tp15698325p15698325.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > >

Re: Inconsistent Search Speed

2008-02-26 Thread Grant Ingersoll
seconds. This does not change with or without calling indexsearcher.close(). As I know, Lucene does not cache results (no filter is involved). So what is causing such a big speed difference? Thank you in advance! fangz -- View this message in context: http://www.nabble.com/Incon

Inconsistent Search Speed

2008-02-26 Thread fangz
onds. This does not change with or without calling indexsearcher.close(). As I know, Lucene does not cache results (no filter is involved). So what is causing such a big speed difference? Thank you in advance! fangz -- View this message in context: http://www.nabble.com/Inconsistent-Se