lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonghui Zhao <zhaoyong...@gmail.com>
Subject EarlyTerminatingSortingCollector is expired in lucene 7.2.1
Date Fri, 01 Jun 2018 12:55:50 GMT
Hi,

I find EarlyTerminatingSortingCollector is expired in lucene 7.2.1.

Java doc says Pass trackTotalHits=false to {@link TopFieldCollector}
instead of using this class.

But I find TopFiledCollector can not fully replace
EarlyTerminatingSortingCollector.

In EarlyTerminatingSortingCollector there is a numDocsToCollect parameter
while TopFiledCollector has not.

Usually we want to early terminate collecting in a reasonable big number.

Let's say I want top 10 result from top 1,000,000 sorting doc while real
total hit may be a huge number.

In TopFiledCollector, if I pass numHits as 1,000,000 then the priority
queue size should be 1,000,000 which is a waste of memory.

In EarlyTerminatingSortingCollector we can set numDocsToCollect as 1,000,000,
but the priority queue size of filter collector may be only 10.

Is it right?

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