msokolov commented on a change in pull request #563: Support for moving FST
offheap except PK
URL: https://github.com/apache/lucene-solr/pull/563#discussion_r255301101
##########
File path:
lucene/core/src/java/org/apache/lucene/codecs/blocktree/FieldReader.java
##########
@@ -86,9 +88,14 @@
if (indexIn != null) {
final IndexInput clone = indexIn.clone();
- //System.out.println("start=" + indexStartFP + " field=" +
fieldInfo.name);
clone.seek(indexStartFP);
- index = new FST<>(clone, ByteSequenceOutputs.getSingleton());
+ // Initialize FST offheap if index is MMapDirectory and
+ // docCount != sumDocFreq implying field is not primary key
+ if (clone instanceof ByteBufferIndexInput && this.docCount !=
this.sumDocFreq) {
+ index = new FST<>(clone, ByteSequenceOutputs.getSingleton(), new
OffHeapFSTStore());
+ } else {
+ index = new FST<>(clone, ByteSequenceOutputs.getSingleton());
Review comment:
Maybe add a print statement here and run the benchmarks to see whether the
primary key field is being detected correctly?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]