Class LuceneOptimizedFieldInfosFormat

java.lang.Object
org.apache.lucene.codecs.FieldInfosFormat
com.apple.foundationdb.record.lucene.codec.LuceneOptimizedFieldInfosFormat

public class LuceneOptimizedFieldInfosFormat extends org.apache.lucene.codecs.FieldInfosFormat
FieldInfosFormat optimized for storage in the FDBDirectory.

The key feature here is that it will store on the file reference a reference to a (potentially) shared protobuf for the FieldInfos, along with a bitset for the subset of the fields in that shared proto that are used in the associated segment. This deduplication is important because segments generally have the same mapping (there is a global mapping used when creating new segments), but we also need to support different segments having incompatible mappings. See Issue #2284 for more information about why we need to support incompatible mappings.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.index.FieldInfos
    read(org.apache.lucene.store.Directory directory, String fileName)
     
    org.apache.lucene.index.FieldInfos
    read(org.apache.lucene.store.Directory directory, org.apache.lucene.index.SegmentInfo segmentInfo, String segmentSuffix, org.apache.lucene.store.IOContext iocontext)
     
    void
    write(org.apache.lucene.store.Directory directory, org.apache.lucene.index.FieldInfos infos, String fileName)
     
    void
    write(org.apache.lucene.store.Directory directory, org.apache.lucene.index.SegmentInfo segmentInfo, String segmentSuffix, org.apache.lucene.index.FieldInfos infos, org.apache.lucene.store.IOContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LuceneOptimizedFieldInfosFormat

      public LuceneOptimizedFieldInfosFormat()
  • Method Details

    • read

      public org.apache.lucene.index.FieldInfos read(org.apache.lucene.store.Directory directory, org.apache.lucene.index.SegmentInfo segmentInfo, String segmentSuffix, org.apache.lucene.store.IOContext iocontext) throws IOException
      Specified by:
      read in class org.apache.lucene.codecs.FieldInfosFormat
      Throws:
      IOException
    • read

      @Nonnull public org.apache.lucene.index.FieldInfos read(org.apache.lucene.store.Directory directory, String fileName) throws IOException
      Throws:
      IOException
    • write

      public void write(org.apache.lucene.store.Directory directory, org.apache.lucene.index.SegmentInfo segmentInfo, String segmentSuffix, org.apache.lucene.index.FieldInfos infos, org.apache.lucene.store.IOContext context) throws IOException
      Specified by:
      write in class org.apache.lucene.codecs.FieldInfosFormat
      Throws:
      IOException
    • write

      public void write(org.apache.lucene.store.Directory directory, org.apache.lucene.index.FieldInfos infos, String fileName) throws IOException
      Throws:
      IOException