You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by GitBox <gi...@apache.org> on 2019/04/03 15:12:37 UTC

[GitHub] [lucene-solr] mikemccand commented on a change in pull request #613: LUCENE-8671: Expose FST off/on-heap options on Lucene50PostingsFormat

mikemccand commented on a change in pull request #613: LUCENE-8671: Expose FST off/on-heap options on Lucene50PostingsFormat
URL: https://github.com/apache/lucene-solr/pull/613#discussion_r271788046
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50PostingsFormat.java
 ##########
 @@ -389,6 +390,33 @@
 
   private final int minTermBlockSize;
   private final int maxTermBlockSize;
+  private final FSTLoadMode fstLoadMode;
+
+  /**
+   * An enum that allows to control if term index FSTs are loaded into memory or read off-heap
+   */
+  public enum FSTLoadMode {
+    /**
+     * Always read FSTs from disk.
+     */
+    OFF_HEAP,
+    /**
+     * Never read FSTs from disk ie. all fields FSTs are loaded into memory
+     */
+    ON_HEAP,
+    /**
+     * Always read FSTs from disk.
+     * An exception is made for ID fields in an IndexWriter context which are always loaded into memory.
+     * This is useful to guarantee best update performance even if a non MMapDirectory is used which required for
+     * the {@link FSTLoadMode#AUTO} mode is used.
 
 Review comment:
   Two `is used` in the last sentence here?
   
   Maybe include a warning here that this does not look at `Directory` type and may put FST off-heap even for buffered directory implementations?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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