diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index a3dc9d595f1f..8266f400b8cb 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -77,6 +77,9 @@ API Changes * GITHUB#12855: Remove deprecated DrillSideways#createDrillDownFacetsCollector extension method. (Greg Miller) +* GITHUB#12980: Make FSTPostingsFormat to build FST off-heap. This PostingsFormat will now + create 2 FST files (tfp.meta and tfp.data) instead of a single one. (Anh Dung Bui) + New Features --------------------- diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTPostingsFormat.java b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTPostingsFormat.java index 0a18b75ac003..6fbbafd9ad8b 100644 --- a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTPostingsFormat.java +++ b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTPostingsFormat.java @@ -28,10 +28,10 @@ import org.apache.lucene.index.SegmentWriteState; import org.apache.lucene.util.IOUtils; -/** FST term dict + Lucene50PBF */ +/** FST term dict + Lucene99PBF */ public final class FSTPostingsFormat extends PostingsFormat { public FSTPostingsFormat() { - super("FST50"); + super("FST99"); } @Override diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsReader.java b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsReader.java index a5b26b77b6a6..22891d4b9f8d 100644 --- a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsReader.java +++ b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsReader.java @@ -65,7 +65,9 @@ public class FSTTermsReader extends FieldsProducer { private final TreeMap fields = new TreeMap<>(); private final PostingsReaderBase postingsReader; + // IndexInput for FST metadata private final IndexInput fstMetaInput; + // IndexInput for FST data private final IndexInput fstDataInput; public FSTTermsReader(SegmentReadState state, PostingsReaderBase postingsReader) diff --git a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsWriter.java b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsWriter.java index e86ec33c323f..3addb4875a53 100644 --- a/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsWriter.java +++ b/lucene/codecs/src/java/org/apache/lucene/codecs/memory/FSTTermsWriter.java @@ -115,8 +115,10 @@ public class FSTTermsWriter extends FieldsConsumer { final PostingsWriterBase postingsWriter; final FieldInfos fieldInfos; - IndexOutput dataOut; + // IndexOutput for FST metadata IndexOutput metaOut; + // IndexOutput for FST data + IndexOutput dataOut; final int maxDoc; final List fields = new ArrayList<>();