compile

Returns the metadata of the final FST. NOTE: this will return null if nothing is accepted by the FST themselves.

To create the FST, you need to:

  • If a FSTReader DataOutput was used, such as the one returned by .getOnHeapReaderWriter

fstMetadata = fstCompiler.compile();
fst = FST.fromFSTReader(fstMetadata, fstCompiler.getFSTReader());
*
  • If a non-FSTReader DataOutput was used, such as [ ], you need to first create the corresponding [ ], such as org.gnit.lucenekmp.store.IndexInput then pass it to the FST construct

fstMetadata = fstCompiler.compile();
fst = new FST<>(fstMetadata, dataInput, new OffHeapFSTStore());
*