You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/11/22 19:06:06 UTC

[GitHub] [lucene] dweiss commented on a change in pull request #460: LUCENE-10247 - reduce size of FSTs by relative coding

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-unsubscribe@lucene.apache.org

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



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