lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: What is speeding up repeated searches?
Date Wed, 17 Dec 2008 18:22:25 GMT
On Wed, Dec 17, 2008 at 12:49 PM, Annette Tisdale
<> wrote:
> I've noticed in our lucene app that subsequent identical searches are faster
> than the first search. So if I search for "things you know" the first
> response time will be 160ms, the second will be 23ms. Then if I search for
> "something else" the first response time will be 133ms and the second will
> be 3ms.

The first search, and the first search per-field can cause some low
level structures to be cached.
There is also hotspot optimization that can make first queries slower
than later queries (but not for too long).
After that, most of that you are seeing will be due to operating
system disk cache (i.e. outside Lucene).


> We don't use FileCache, CachingWrapperFilter or QueryFilter and it's not
> just the very first query which is substantially slower it's the first
> attempt with each unique query.
> Can anyone tell me what is happening in SearchIndexer to cause repeated
> searches to be faster?
> thank you,
> Annette
> --
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message