jruby/docs BETA
Navigation
org.apache.lucene.codecs 40
C BlockTermState
C BufferingKnnVectorsWriter
C Codec
C CodecUtil
C CompetitiveImpactAccumulator
C CompoundDirectory
C CompoundFormat
C DocValuesConsumer
C DocValuesFormat
C DocValuesProducer
C FieldInfosFormat
C FieldsConsumer
C FieldsProducer
C FilterCodec
C Impact
C KnnFieldVectorsWriter
C KnnVectorsFormat
C KnnVectorsReader
C KnnVectorsWriter
C LiveDocsFormat
C MultiLevelSkipListReader
C MultiLevelSkipListWriter
C MutablePointTree
C NormsConsumer
C NormsFormat
C NormsProducer
C PointsFormat
C PointsReader
C PointsWriter
C PostingsFormat
C PostingsReaderBase
C PostingsWriterBase
C PushPostingsWriterBase
C SegmentInfoFormat
C StoredFieldsFormat
C StoredFieldsReader
C StoredFieldsWriter
C TermVectorsFormat
C TermVectorsReader
C TermVectorsWriter
FieldsConsumer — members 3
C close()
C merge(merge_state, norms)
C write(fields, norms)

org.apache.lucene.codecs.FieldsConsumer

class abstract implements Closeable 3 members

Abstract API that consumes terms, doc, freq, prox, offset and payloads postings. Concrete implementations of this actually do "something" with the postings (write it into the index in a specific format).

Instance Methods

close

close ( )
Java: close()

merge

merge ( MergeState merge_state, NormsProducer norms )
Java: merge(org.apache.lucene.index.MergeState mergeState, org.apache.lucene.codecs.NormsProducer norms)

Merges in the fields from the readers in mergeState. The default implementation skips and maps around deleted documents, and calls #write(Fields,NormsProducer). Implementations can override this method for more sophisticated merging (bulk-byte copying, etc).

write

write ( Fields fields, NormsProducer norms )
Java: write(org.apache.lucene.index.Fields fields, org.apache.lucene.codecs.NormsProducer norms)

Write all fields, terms and postings. This the "pull" API, allowing you to iterate more than once over the postings, somewhat analogous to using a DOM API to traverse an XML tree.

Notes:

  • You must compute index statistics, including each Term's docFreq and totalTermFreq, as well as the summary sumTotalTermFreq, sumTotalDocFreq and docCount.
  • You must skip terms that have no docs and fields that have no terms, even though the provided Fields API will expose them; this typically requires lazily writing the field or term until you've actually seen the first term or document.
  • The provided Fields instance is limited: you cannot call any methods that return statistics/counts; you cannot pass a non-null live docs when pulling docs/positions enums.

this work for additional information regarding copyright ownership.