Avoid adding a TotalHitCountCollector to Lucene queries unless absolutely necessary

Description

Having a TopDocsCollector AND a totalHitCountCollector incurs additional cost, not just because there are two object to call "collect" on, but also because several layers of wrapping will be added to collectors when there are more than one collector.

Tested with an Infinispan performance test:

  • Without TotalHitCountCollector:

  • With TotalHitCountCollector:

Environment

None

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure