iverase commented on a change in pull request #476:
URL: https://github.com/apache/lucene/pull/476#discussion_r757001712
##########
File path: lucene/core/src/java/org/apache/lucene/util/bkd/BKDReader.java
##########
@@ -297,11 +301,20 @@ public boolean moveToChild() throws IOException {
if (isLeafNode()) {
return false;
}
+ maybeResetNodeDataPosition();
pushBoundsLeft();
pushLeft();
return true;
}
+ private void maybeResetNodeDataPosition() throws IOException {
+ if (readNodeDataPositions[level] != innerNodes.getFilePointer()) {
+ // move position of the inner nodes index in case we move to the first
child
+ assert readNodeDataPositions[level] < innerNodes.getFilePointer();
+ innerNodes.seek(readNodeDataPositions[level]);
+ }
Review comment:
yes, quick check and it makes no difference.
##########
File path: lucene/core/src/java/org/apache/lucene/util/bkd/BKDReader.java
##########
@@ -515,15 +529,20 @@ public void addAll(PointValues.IntersectVisitor visitor,
boolean grown) throws I
@Override
public void visitDocValues(PointValues.IntersectVisitor visitor) throws
IOException {
+ maybeResetNodeDataPosition();
+ addOneByOne(visitor);
+ }
+
+ public void addOneByOne(PointValues.IntersectVisitor visitor) throws
IOException {
Review comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]