jainankitk commented on a change in pull request #601: Adding reader settings 
for moving fst offheap
URL: https://github.com/apache/lucene-solr/pull/601#discussion_r264098512
 
 

 ##########
 File path: 
lucene/core/src/java/org/apache/lucene/codecs/blocktree/FieldReader.java
 ##########
 @@ -88,10 +97,13 @@
 
     if (indexIn != null) {
       final IndexInput clone = indexIn.clone();
+      //System.out.println("start=" + indexStartFP + " field=" + 
fieldInfo.name);
       clone.seek(indexStartFP);
-      // Initialize FST offheap if index is MMapDirectory and
-      // docCount != sumDocFreq implying field is not primary key
-      if (clone instanceof ByteBufferIndexInput && this.docCount != 
this.sumDocFreq) {
+
+      final boolean fstOffHeap = readerAttributes != null && 
"true".equals(readerAttributes.get(FST_OFFHEAP_ATTRIBUTE));
 
 Review comment:
   That was the plan initially, but given that non-PK eligible fields are 
offheap by default. Having single setting instead of per field setting makes 
more sense.
   ```
   If false:
   Only non-PK fields offheap
   If true:
   All fields offheap
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to