TopScoreDocCollectorManager
Creates a new TopScoreDocCollectorManager given the number of hits to collect and the number of hits to count accurately, with thread-safe internal states.
NOTE: If the total hit count of the top docs is less than or exactly totalHitsThreshold then this value is accurate. On the other hand, if the value is greater than totalHitsThreshold then its value is a lower bound of the hit count. A value of Integer.MAX_VALUE will make the hit count accurate but will also likely make query processing slower.
NOTE: The instances returned by this method pre-allocate a full array of length numHits, and fill the array with sentinel objects.
Parameters
the number of results to collect.
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.
Deprecated
Use {@link #TopScoreDocCollectorManager(int, ScoreDoc, int)}, the supportsConcurrency parameter is now a no-op.
Creates a new TopScoreDocCollectorManager given the number of hits to collect and the number of hits to count accurately.
NOTE: If the total hit count of the top docs is less than or exactly totalHitsThreshold then this value is accurate. On the other hand, if the value is greater than totalHitsThreshold then its value is a lower bound of the hit count. A value of Integer.MAX_VALUE will make the hit count accurate but will also likely make query processing slower.
NOTE: The instances returned by this method pre-allocate a full array of length numHits, and fill the array with sentinel objects.
Parameters
the number of results to collect.
the previous doc after which matching docs will be collected.
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.