lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonghui Zhao <>
Subject strange performance diff
Date Fri, 10 Nov 2017 14:18:35 GMT

I use the code below to test same query on same index in one time.

long t0 = System.currentTimeMillis();, from + size);
long t1 = System.currentTimeMillis();", from + size) took:" + (t1 -
t0) + "ms");
TopScoreDocCollector collector = TopScoreDocCollector.create(from +
size, null, true);, collector);
long t2 = System.currentTimeMillis();"TopScoreDocCollector took:" + (t2 - t1) + "ms");

The query is a simple long boolean query such like "title:(a strange perf
The index is 13M docs.
Lucene version is 4.10.4.
No parallel search enabled, i.e.  ExectutorService is null in IndexSearcher

The first case is direct search, the second is use TopScoreDocCollector
which is indeed inner implementation of direct search.

I test many times, the result is very stable the first case result is about
300ms, the second is about 600ms.

I am wondering where is the difference from.

Anyone can give a hint?

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