Optimizations for when count=0 and/or there is no sortspec

Description

Improve the Collector such that:

When count is 0, there is no need to create a PQ and iterate thru the doc list, only the totalcount and facet counts are needed.

When there is no sortspec, we don't need to keep a PQ either, just have a list and stop collecting until enough is needed, the rest just do counting.

Environment

None

Assignee

John Wang

Reporter

John Wang

Labels

None

Time tracking

24h

Components

Fix versions

Priority

Major
Configure