iverase commented on a change in pull request #486:
URL: https://github.com/apache/lucene/pull/486#discussion_r761838139
##########
File path:
lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90PointsWriter.java
##########
@@ -147,24 +145,7 @@ public void writeField(FieldInfo fieldInfo, PointsReader
reader) throws IOExcept
return;
}
- values.visitDocValues(
- new IntersectVisitor() {
- @Override
- public void visit(int docID) {
- throw new IllegalStateException();
- }
-
- @Override
- public void visit(int docID, byte[] packedValue) throws
IOException {
- writer.add(packedValue, docID);
- }
-
- @Override
- public Relation compare(byte[] minPackedValue, byte[]
maxPackedValue) {
- return Relation.CELL_CROSSES_QUERY;
- }
- });
-
+ values.visitDocValues((docID, packedValue) -> writer.add(packedValue,
docID));
Review comment:
sweet, I reversed out and using a method reference is much nicer.
--
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]