You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "jpountz (via GitHub)" <gi...@apache.org> on 2025/05/09 13:25:33 UTC

[PR] Use the preload hint on completion fields and memory terms dictionaries. [lucene]

jpountz opened a new pull request, #14634:
URL: https://github.com/apache/lucene/pull/14634

   This enables the `PreloadHint` introduced in #14604 on completion fields and memory terms dictionaries, which are both expected to fit in the page cache in practice.
   
   I don't have specific interest in these two file formats, I was more interested in having more than one file format that uses `PreloadHint` to make sure it's generally useful and not only to KNN vectors.


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


Re: [PR] Use the preload hint on completion fields and memory terms dictionaries. [lucene]

Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on code in PR #14634:
URL: https://github.com/apache/lucene/pull/14634#discussion_r2081686750


##########
lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsReader.java:
##########
@@ -75,7 +76,8 @@ public FSTTermsReader(SegmentReadState state, PostingsReaderBase postingsReader)
 
     this.postingsReader = postingsReader;
     this.fstTermsInput =
-        state.directory.openInput(termsFileName, state.context.withHints(FileTypeHint.INDEX));
+        state.directory.openInput(
+            termsFileName, state.context.withHints(FileTypeHint.DATA, PreloadHint.INSTANCE));

Review Comment:
   I also changed the FileTypeHint to DATA since this FST effectively stores all the terms data.



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


Re: [PR] Use the preload hint on completion fields and memory terms dictionaries. [lucene]

Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #14634:
URL: https://github.com/apache/lucene/pull/14634#issuecomment-2866543005

   cc @thecoop @ChrisHegarty 


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


Re: [PR] Use the preload hint on completion fields and memory terms dictionaries. [lucene]

Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz merged PR #14634:
URL: https://github.com/apache/lucene/pull/14634


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