Which OS are you on?

It's possible the OS has decided to swap Tomcat's pages out to use RAM as IO cache for other processes, instead.

Mike

thiruvee wrote:


Hi David,

Thanks for your reply.
1. I will try having warm up queries after index is created, that will solve
to some extent.
2. The biggest problem is server would be idle for long time.

I am using spring in my project and the searcher,reader are singleton
objects managed by spring.

I don't use any servlet, but i use AXIS to expose as webservice.

Please suggest me any other thoughts...

Thanks
Ravi


David Causse-2 wrote:

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




--
View this message in context: 
http://www.nabble.com/First-request-for-search-is-taking-longer-time-and-subequent-requests-are-very-fast-tp22663883p22665327.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to