Hi,
Searcher and IndexReader use an internal cache, when your searcher is
created the first query is slow cause lucene fills its cache.
We re-use whenever possible searchers and readers instances.
I've heard on this list that it's also a solution to launch warmup
queries just after reader/searcher instanciation and not wait for an end
user query.
When your server is idle for long maybe your servlet instance are
serialized to disk and you store your searcher insible a member variable
of it? I guess you have to find another way to store your searcher, a
singleton or something like that.
David.
thiruvee a écrit :
Hi
I am using Lucene 2.4 in our project.
I am using FSdirectory to store the index.
when ever index is updated the first search is very slow.
I am using the combination of CustomScoreQuery and DisjunctionMaxQuery for
searching.
This slowness I observed even when the server (tomcat/websphere) is idle for
quite a long time.
I tried to using RAMDirectory instead of FSDirectory, the response time was
improved, but still the difference the between first search and subsequent
search is there.
Any help regarding this would be highly appreciated.
Thanks
Ravi
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org