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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.index.FieldInfosorg.apache.lucene.index.FieldInfosread(org.apache.lucene.store.Directory directory, org.apache.lucene.index.SegmentInfo segmentInfo, String segmentSuffix, org.apache.lucene.store.IOContext iocontext) voidwrite(org.apache.lucene.store.Directory directory, org.apache.lucene.index.FieldInfos infos, String fileName) voidwrite(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)
-
Field Details
-
EXTENSION
- See Also:
-
-
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:
readin classorg.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:
writein classorg.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
-