Class IndexingChain.FieldSchema

java.lang.Object
org.apache.lucene.index.IndexingChain.FieldSchema
Enclosing class:
IndexingChain

private static final class IndexingChain.FieldSchema extends Object
A schema of the field in the current document. With every new document this schema is reset. As the document fields are processed, we update the schema with options encountered in this document. Once the processing for the document is done, we compare the built schema of the current document with the corresponding FieldInfo (FieldInfo is built on a first document in the segment where we encounter this field). If there is inconsistency, we raise an error. This ensures that a field has the same data structures across all documents.
  • Field Details

    • name

      private final String name
    • docID

      private int docID
    • attributes

      private final Map<String,String> attributes
    • omitNorms

      private boolean omitNorms
    • storeTermVector

      private boolean storeTermVector
    • indexOptions

      private IndexOptions indexOptions
    • docValuesType

      private DocValuesType docValuesType
    • pointDimensionCount

      private int pointDimensionCount
    • pointIndexDimensionCount

      private int pointIndexDimensionCount
    • pointNumBytes

      private int pointNumBytes
    • vectorDimension

      private int vectorDimension
    • vectorEncoding

      private VectorEncoding vectorEncoding
    • vectorSimilarityFunction

      private VectorSimilarityFunction vectorSimilarityFunction
    • errMsg

      private static String errMsg
  • Constructor Details

    • FieldSchema

      FieldSchema(String name)
  • Method Details

    • assertSame

      private void assertSame(String label, boolean expected, boolean given)
    • assertSame

      private void assertSame(String label, int expected, int given)
    • assertSame

      private <T extends Enum<?>> void assertSame(String label, T expected, T given)
    • raiseNotSame

      private void raiseNotSame(String label, Object expected, Object given)
    • updateAttributes

      void updateAttributes(Map<String,String> attrs)
    • setIndexOptions

      void setIndexOptions(IndexOptions newIndexOptions, boolean newOmitNorms, boolean newStoreTermVector)
    • setDocValues

      void setDocValues(DocValuesType newDocValuesType)
    • setPoints

      void setPoints(int dimensionCount, int indexDimensionCount, int numBytes)
    • setVectors

      void setVectors(VectorEncoding encoding, VectorSimilarityFunction similarityFunction, int dimension)
    • reset

      void reset(int doc)
    • assertSameSchema

      void assertSameSchema(FieldInfo fi)