mikemccand commented on code in PR #12624: URL: https://github.com/apache/lucene/pull/12624#discussion_r1402022525
########## lucene/core/src/java/org/apache/lucene/util/fst/FST.java: ########## @@ -435,6 +433,13 @@ public FST(FSTMetadata<T> metadata, DataInput in, Outputs<T> outputs, FSTStore f this.fstReader = fstReader; } + /** + * @return true if and only if this FST is readable (e.g has a reverse BytesReader) + */ + public boolean isReadable() { Review Comment: We can remove this in the followon PR (the one that changes FSTCompiler to return FSTMetadata not FST)? ########## lucene/core/src/java/org/apache/lucene/codecs/lucene90/blocktree/Lucene90BlockTreeTermsWriter.java: ########## @@ -16,6 +16,8 @@ */ package org.apache.lucene.codecs.lucene90.blocktree; +import static org.apache.lucene.util.fst.FSTCompiler.getOnHeapDataOutput; Review Comment: Can we rename to `getOnHeapReaderWriter`? ########## lucene/core/src/java/org/apache/lucene/util/fst/FSTCompiler.java: ########## @@ -248,15 +305,17 @@ public Builder<T> directAddressingMaxOversizingFactor(float factor) { /** Creates a new {@link FSTCompiler}. */ public FSTCompiler<T> build() { - FSTCompiler<T> fstCompiler = - new FSTCompiler<>( - inputType, - suffixRAMLimitMB, - outputs, - allowFixedLengthArcs, - bytesPageBits, - directAddressingMaxOversizingFactor); - return fstCompiler; + try { + return new FSTCompiler<>( + inputType, + suffixRAMLimitMB, + outputs, + allowFixedLengthArcs, + dataOutput, + directAddressingMaxOversizingFactor); + } catch (IOException e) { + throw new RuntimeException(e); Review Comment: OK I merged #12830. -- 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. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org