The first call loads various data structures into memory. The second
takes advantage of those structures being in memory. What you want to
do is "warm" the searcher by sending some queries to it before making
it available.
-Grant
On Feb 26, 2008, at 3:49 PM, fangz wrote:
Hi,
I am using a simple java program to test the search speed. The index
file is
about 1.93G in size. I initiated an indexsearcher and built a query
using
the query parser: parser.parse("entity:fail"). The initial run took
more
than 60 seconds, but the subsequent runs only took 1.5 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/Inconsistent-Search-Speed-tp15698325p15698325.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------
Grant Ingersoll
http://www.lucenebootcamp.com
Next Training: April 7, 2008 at ApacheCon Europe in Amsterdam
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]