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

    Fields
    Modifier and Type
    Field
    Description
    protected com.apple.foundationdb.record.lucene.LuceneStoredFieldsProto.LuceneStoredFields.Builder
     

    Fields inherited from interface org.apache.lucene.util.Accountable

    NULL_ACCOUNTABLE
  • Constructor Summary

    Constructors
    Constructor
    Description
    LuceneOptimizedStoredFieldsWriter(FDBDirectory directory, org.apache.lucene.index.SegmentInfo si)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    finish(org.apache.lucene.index.FieldInfos fis, int numDocs)
     
    void
     
    Collection<org.apache.lucene.util.Accountable>
     
    int
    merge(org.apache.lucene.index.MergeState mergeState)
     
    long
     
    void
     
    void
    writeField(org.apache.lucene.index.FieldInfo info, org.apache.lucene.index.IndexableField field)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public void startDocument() throws IOException
      Specified by:
      startDocument in class org.apache.lucene.codecs.StoredFieldsWriter
      Throws:
      IOException
    • finishDocument

      public void finishDocument() throws IOException
      Overrides:
      finishDocument in class org.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:
      writeField in class org.apache.lucene.codecs.StoredFieldsWriter
      Throws:
      IOException
    • finish

      public void finish(org.apache.lucene.index.FieldInfos fis, int numDocs) throws IOException
      Specified by:
      finish in class org.apache.lucene.codecs.StoredFieldsWriter
      Throws:
      IOException
    • merge

      public int merge(org.apache.lucene.index.MergeState mergeState) throws IOException
      Overrides:
      merge in class org.apache.lucene.codecs.StoredFieldsWriter
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in class org.apache.lucene.codecs.StoredFieldsWriter
      Throws:
      IOException
    • ramBytesUsed

      public long ramBytesUsed()
    • getChildResources

      public Collection<org.apache.lucene.util.Accountable> getChildResources()