mirror of https://github.com/apache/lucene.git
NeighborQueue.reset() now clears incomplete flag
This commit is contained in:
parent
3e4ca4042c
commit
6b51cce0b8
|
@ -156,6 +156,7 @@ public class NeighborQueue {
|
||||||
public void clear() {
|
public void clear() {
|
||||||
heap.clear();
|
heap.clear();
|
||||||
visitedCount = 0;
|
visitedCount = 0;
|
||||||
|
incomplete = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int visitedCount() {
|
public int visitedCount() {
|
||||||
|
|
|
@ -72,10 +72,12 @@ public class TestNeighborQueue extends LuceneTestCase {
|
||||||
nn.add(1, 1.1f);
|
nn.add(1, 1.1f);
|
||||||
nn.add(2, -2.2f);
|
nn.add(2, -2.2f);
|
||||||
nn.setVisitedCount(42);
|
nn.setVisitedCount(42);
|
||||||
|
nn.markIncomplete();
|
||||||
nn.clear();
|
nn.clear();
|
||||||
|
|
||||||
assertEquals(0, nn.size());
|
assertEquals(0, nn.size());
|
||||||
assertEquals(0, nn.visitedCount());
|
assertEquals(0, nn.visitedCount());
|
||||||
|
assertFalse(nn.incomplete());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testMaxSizeQueue() {
|
public void testMaxSizeQueue() {
|
||||||
|
|
Loading…
Reference in New Issue