dweiss commented on a change in pull request #460:
URL: https://github.com/apache/lucene/pull/460#discussion_r754558907



##########
File path: lucene/core/src/java/org/apache/lucene/util/fst/Util.java
##########
@@ -878,11 +878,20 @@ public static BytesRef toBytesRef(IntsRef input, 
BytesRefBuilder scratch) {
       } else if (arc.isLast()) {
         return null;
       } else {
-        fst.readNextRealArc(arc, in);
+        fst.readNextRealArc(arc, in, follow.target());
       }
     }
   }
 
+  public static int calculateVLongLength(long i) {

Review comment:
       This can be computed directly (without the loop) from the number of 
leading zeros (Long.numberOfLeadingZeros)?

##########
File path: 
lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsReader.java
##########
@@ -646,7 +646,7 @@ Frame loadNextFrame(Frame top, Frame frame) throws 
IOException {
           return null;
         }
         while (!frame.fstArc.isLast()) {
-          frame.fstArc = fst.readNextRealArc(frame.fstArc, fstReader);
+          frame.fstArc = fst.readNextRealArc(frame.fstArc, fstReader, 
top.fstArc.target());

Review comment:
       Yeah... this extra parameter is only adding confusion to those methods - 
I never liked them too much, it'd be great to have some kind of abstraction for 
iterating over node's arcs (but it'd slow down things too). Eh.




-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to