javanna commented on code in PR #14270: URL: https://github.com/apache/lucene/pull/14270#discussion_r1965564752
########## lucene/suggest/src/java/org/apache/lucene/search/suggest/document/CompletionPostingsFormat.java: ########## @@ -104,6 +104,9 @@ public abstract class CompletionPostingsFormat extends PostingsFormat { static final String INDEX_EXTENSION = "cmp"; static final String DICT_EXTENSION = "lkp"; + public static final FSTLoadMode DEFAULT_FST_LOAD_MODE = FSTLoadMode.ON_HEAP; + public static FSTLoadMode FST_LOAD_MODE = DEFAULT_FST_LOAD_MODE; Review Comment: A mutable static field is certainly not elegant. I am out of ideas of how we can allow to swap reading between on_heap and off_heap without requiring a specific postings format for each load mode, which would be odd given loading is merely a read aspect and does not affect the writing side in any way. Having to rely on the default constructor is quite limiting. On the other hand this is an improvement compared to what we had until now. -- 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