Class LuceneOptimizedCodec

java.lang.Object
org.apache.lucene.codecs.Codec
com.apple.foundationdb.record.lucene.codec.LuceneOptimizedCodec
All Implemented Interfaces:
org.apache.lucene.util.NamedSPILoader.NamedSPI

@AutoService(org.apache.lucene.codecs.Codec.class) public class LuceneOptimizedCodec extends org.apache.lucene.codecs.Codec
Codec with a few optimizations for speeding up compound files sitting on FoundationDB. Optimizations: - .cfe file references are not stored - .cfe file data is serialized as entries on the current compound file reference (.cfs) - .si file references are not stored - .si file data is serialized as segmentInfo on the current compound file reference (.cfs) - .si diagnostic information is not stored - Removed checksum validation on Compound File Reader Forwards/backwards compatibility is not supported during transition from the Lucene87Codec to this implementation unfortunately. Indexes need to rebuilt before handling search requests.
  • Field Details

  • Constructor Details

    • LuceneOptimizedCodec

      public LuceneOptimizedCodec()
      Instantiates a new codec.

      The constant "RL" is an arbitrary name for the codec that will be written into the index segment.

  • Method Details

    • postingsFormat

      public org.apache.lucene.codecs.PostingsFormat postingsFormat()
      Specified by:
      postingsFormat in class org.apache.lucene.codecs.Codec
    • docValuesFormat

      public org.apache.lucene.codecs.DocValuesFormat docValuesFormat()
      Specified by:
      docValuesFormat in class org.apache.lucene.codecs.Codec
    • storedFieldsFormat

      public org.apache.lucene.codecs.StoredFieldsFormat storedFieldsFormat()
      Specified by:
      storedFieldsFormat in class org.apache.lucene.codecs.Codec
    • termVectorsFormat

      public org.apache.lucene.codecs.TermVectorsFormat termVectorsFormat()
      Specified by:
      termVectorsFormat in class org.apache.lucene.codecs.Codec
    • fieldInfosFormat

      public org.apache.lucene.codecs.FieldInfosFormat fieldInfosFormat()
      Specified by:
      fieldInfosFormat in class org.apache.lucene.codecs.Codec
    • segmentInfoFormat

      public org.apache.lucene.codecs.SegmentInfoFormat segmentInfoFormat()
      Specified by:
      segmentInfoFormat in class org.apache.lucene.codecs.Codec
    • normsFormat

      public org.apache.lucene.codecs.NormsFormat normsFormat()
      Specified by:
      normsFormat in class org.apache.lucene.codecs.Codec
    • liveDocsFormat

      public org.apache.lucene.codecs.LiveDocsFormat liveDocsFormat()
      Specified by:
      liveDocsFormat in class org.apache.lucene.codecs.Codec
    • compoundFormat

      public org.apache.lucene.codecs.CompoundFormat compoundFormat()
      Specified by:
      compoundFormat in class org.apache.lucene.codecs.Codec
    • pointsFormat

      public org.apache.lucene.codecs.PointsFormat pointsFormat()
      Specified by:
      pointsFormat in class org.apache.lucene.codecs.Codec
    • getPostingsFormatForField

      public org.apache.lucene.codecs.PostingsFormat getPostingsFormatForField(String field)
    • getDocValuesFormatForField

      public org.apache.lucene.codecs.DocValuesFormat getDocValuesFormatForField(String field)