TopFieldCollectorManager

constructor(sort: Sort, numHits: Int, after: FieldDoc?, totalHitsThreshold: Int)


constructor(sort: Sort, numHits: Int, totalHitsThreshold: Int)

Creates a new TopFieldCollectorManager from the given arguments, with thread-safe internal states.

NOTE: The instances returned by this method pre-allocate a full array of length numHits.

Parameters

sort

the sort criteria (SortFields).

numHits

the number of results to collect.

totalHitsThreshold

the number of docs to count accurately. If the query matches more than totalHitsThreshold hits then its hit count will be a lower bound. On the other hand if the query matches less than or exactly totalHitsThreshold hits then the hit count of the result will be accurate. Integer.MAX_VALUE may be used to make the hit count accurate, but this will also make query processing slower.


constructor(sort: Sort, numHits: Int, after: FieldDoc?, totalHitsThreshold: Int, supportsConcurrency: Boolean)

Deprecated

Use {@link #TopFieldCollectorManager(Sort, int, FieldDoc, int)}, the supportsConcurrency parameter is now a no-op.

Creates a new TopFieldCollectorManager from the given arguments.

NOTE: The instances returned by this method pre-allocate a full array of length numHits.

Parameters

sort

the sort criteria (SortFields).

numHits

the number of results to collect.

after

the previous doc after which matching docs will be collected.

totalHitsThreshold

the number of docs to count accurately. If the query matches more than totalHitsThreshold hits then its hit count will be a lower bound. On the other hand if the query matches less than or exactly totalHitsThreshold hits then the hit count of the result will be accurate. Integer.MAX_VALUE may be used to make the hit count accurate, but this will also make query processing slower.

supportsConcurrency

to use thread-safe and slower internal states for count tracking.