Class LuceneOptimizedStoredFieldsWriter
java.lang.Object
org.apache.lucene.codecs.StoredFieldsWriter
com.apple.foundationdb.record.lucene.codec.LuceneOptimizedStoredFieldsWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.util.Accountable
public class LuceneOptimizedStoredFieldsWriter
extends org.apache.lucene.codecs.StoredFieldsWriter
An implementation of
StoredFieldsWriter for fields stored in the DB.
The data for the fields is protobuf-encoded (see lucene_stored_fields.proto) message.
The subspace for the range of documents is the segment name.
Within the subspace, each document key is then suffixed by the docId.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.codecs.StoredFieldsWriter
org.apache.lucene.codecs.StoredFieldsWriter.MergeVisitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.apple.foundationdb.record.lucene.LuceneStoredFieldsProto.LuceneStoredFields.BuilderFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionLuceneOptimizedStoredFieldsWriter(FDBDirectory directory, org.apache.lucene.index.SegmentInfo si) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidfinish(org.apache.lucene.index.FieldInfos fis, int numDocs) voidCollection<org.apache.lucene.util.Accountable>intmerge(org.apache.lucene.index.MergeState mergeState) longvoidvoidwriteField(org.apache.lucene.index.FieldInfo info, org.apache.lucene.index.IndexableField field)
-
Field Details
-
storedFields
protected com.apple.foundationdb.record.lucene.LuceneStoredFieldsProto.LuceneStoredFields.Builder storedFields
-
-
Constructor Details
-
LuceneOptimizedStoredFieldsWriter
public LuceneOptimizedStoredFieldsWriter(FDBDirectory directory, org.apache.lucene.index.SegmentInfo si) throws IOException - Throws:
IOException
-
-
Method Details
-
startDocument
- Specified by:
startDocumentin classorg.apache.lucene.codecs.StoredFieldsWriter- Throws:
IOException
-
finishDocument
- Overrides:
finishDocumentin classorg.apache.lucene.codecs.StoredFieldsWriter- Throws:
IOException
-
writeField
public void writeField(org.apache.lucene.index.FieldInfo info, org.apache.lucene.index.IndexableField field) throws IOException - Specified by:
writeFieldin classorg.apache.lucene.codecs.StoredFieldsWriter- Throws:
IOException
-
finish
- Specified by:
finishin classorg.apache.lucene.codecs.StoredFieldsWriter- Throws:
IOException
-
merge
- Overrides:
mergein classorg.apache.lucene.codecs.StoredFieldsWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.lucene.codecs.StoredFieldsWriter- Throws:
IOException
-
ramBytesUsed
public long ramBytesUsed() -
getChildResources
-