mirror of https://github.com/apache/lucene.git
Avoid iterations: cooling using simulated annealing
This commit is contained in:
parent
3ad73336ae
commit
35aea56ad4
|
@ -472,8 +472,12 @@ public final class BPIndexReorderer {
|
|||
|
||||
@Override
|
||||
public int comparePivot(int j) {
|
||||
int cmp = Float.compare(pivotBias, biases[j]);
|
||||
if (cmp == 0) {
|
||||
int cmp = Float.compare(pivotBias-iter, biases[j]);
|
||||
if (cmp > 0) {
|
||||
return cmp;
|
||||
}
|
||||
cmp = Float.compare(pivotBias, biases[j]);
|
||||
if (cmp >= 0) {
|
||||
// Tie break on the doc ID to preserve doc ID ordering as much as possible
|
||||
cmp = pivotDoc - docIDs.ints[j];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue