You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Tony-X (via GitHub)" <gi...@apache.org> on 2023/09/12 20:32:37 UTC

[GitHub] [lucene] Tony-X commented on a diff in pull request #12552: Make FSTPostingsFormat load FSTs off-heap

Tony-X commented on code in PR #12552:
URL: https://github.com/apache/lucene/pull/12552#discussion_r1323531587


##########
lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsReader.java:
##########
@@ -191,7 +193,9 @@ final class TermsReader extends Terms {
       this.sumTotalTermFreq = sumTotalTermFreq;
       this.sumDocFreq = sumDocFreq;
       this.docCount = docCount;
-      this.dict = new FST<>(in, in, new FSTTermOutputs(fieldInfo));
+      OffHeapFSTStore offHeapFSTStore = new OffHeapFSTStore();
+      this.dict = new FST<>(in, in, new FSTTermOutputs(fieldInfo), offHeapFSTStore);
+      in.skipBytes(offHeapFSTStore.size());

Review Comment:
   The OffHeapFSTStore doesn't advance the input (but the on-heap one does), we need to seek it manually since the input contains multiple FSTs. 



-- 
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