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_r264373499
 
 

 ##########
 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:
   >why is this? I mean there might be fields that can easily be off-heap while 
another one should be on-heap?
   
   Having per field setting is unnecessary cognitive load for the user, given 
that non PK eligible fields are offheap by default. So, users want PK eligible 
fields either offheap or onheap.
   Initially, I did try it with [this 
patch](https://issues.apache.org/jira/secure/attachment/12958117/offheap_generic_settings.patch),
 but found it to be unnecessary. There can be dynamic fields as well, for which 
you need special keyword, which needs to account for all combinations of 
offheap and onheap.

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