mirror of https://github.com/apache/lucene.git
docs: expand short-circuit explanation
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1028777 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7b53bdf808
commit
584d68f2e0
|
@ -177,6 +177,11 @@ class TopGroupCollector extends GroupCollector {
|
|||
// if orderedGroups != null, then we already have collected N groups and
|
||||
// can short circuit by comparing this document to the smallest group
|
||||
// without having to even find what group this document belongs to.
|
||||
// Even if this document belongs to a group in the top N, we know that
|
||||
// we don't have to update that group.
|
||||
//
|
||||
// Downside: if the number of unique groups is very low, this is
|
||||
// wasted effort as we will most likely be updating an existing group.
|
||||
if (orderedGroups != null) {
|
||||
for (int i = 0;; i++) {
|
||||
final int c = reversed[i] * comparators[i].compareBottom(doc);
|
||||
|
|
Loading…
Reference in New Issue