lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Lucene performance: is search time linear to the index size?
Date Thu, 18 Jun 2009 07:44:07 GMT
Opening a searcher and doing the first query incurs a significant amount of
overhead, cache loading, etc. Inferring search times relative to index size
with a program like you describe is unreliable.

Try firing a few queries at the index without measuring, *then* measure the
time it takes for subsequent queries and you'll get a much better picture of
actual response time.

The fact that a program that fires a single query at a newly opened reader
has near-linear performance isn't as surprising as all that. I'd be more
concerned if, say, queries 10 through 100 *on the same underlying reader*
displayed this behavior.


especially the questions around:
*When measuring performance, disregard the first query

On Thu, Jun 18, 2009 at 12:49 AM, Teruhiko Kurosaka <>wrote:

> I've written a test program that uses the simplest form of search,
> TermQuery and measure the time it takes to search a term in a field
> on indices of various sizes.
> The result is a very linear growth of search time vs the index size in
> terms of # of Documents, not # of unique terms in that field.
> -kuro
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message