Package org.apache.lucene.index
Class IndexingChain.FieldSchema
- java.lang.Object
-
- org.apache.lucene.index.IndexingChain.FieldSchema
-
- Enclosing class:
- IndexingChain
private static final class IndexingChain.FieldSchema extends java.lang.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 Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String>
attributes
private int
docID
private DocValuesType
docValuesType
private static java.lang.String
errMsg
private IndexOptions
indexOptions
private java.lang.String
name
private boolean
omitNorms
private int
pointDimensionCount
private int
pointIndexDimensionCount
private int
pointNumBytes
private boolean
storeTermVector
private int
vectorDimension
private VectorSimilarityFunction
vectorSimilarityFunction
-
Constructor Summary
Constructors Constructor Description FieldSchema(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
assertSame(java.lang.String label, boolean expected, boolean given)
private void
assertSame(java.lang.String label, int expected, int given)
private <T extends java.lang.Enum<?>>
voidassertSame(java.lang.String label, T expected, T given)
(package private) void
assertSameSchema(FieldInfo fi)
private void
raiseNotSame(java.lang.String label, java.lang.Object expected, java.lang.Object given)
(package private) void
reset(int doc)
(package private) void
setDocValues(DocValuesType newDocValuesType)
(package private) void
setIndexOptions(IndexOptions newIndexOptions, boolean newOmitNorms, boolean newStoreTermVector)
(package private) void
setPoints(int dimensionCount, int indexDimensionCount, int numBytes)
(package private) void
setVectors(VectorSimilarityFunction similarityFunction, int dimension)
(package private) void
updateAttributes(java.util.Map<java.lang.String,java.lang.String> attrs)
-
-
-
Field Detail
-
name
private final java.lang.String name
-
docID
private int docID
-
attributes
private final java.util.Map<java.lang.String,java.lang.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
-
vectorSimilarityFunction
private VectorSimilarityFunction vectorSimilarityFunction
-
errMsg
private static java.lang.String errMsg
-
-
Method Detail
-
assertSame
private void assertSame(java.lang.String label, boolean expected, boolean given)
-
assertSame
private void assertSame(java.lang.String label, int expected, int given)
-
assertSame
private <T extends java.lang.Enum<?>> void assertSame(java.lang.String label, T expected, T given)
-
raiseNotSame
private void raiseNotSame(java.lang.String label, java.lang.Object expected, java.lang.Object given)
-
updateAttributes
void updateAttributes(java.util.Map<java.lang.String,java.lang.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(VectorSimilarityFunction similarityFunction, int dimension)
-
reset
void reset(int doc)
-
assertSameSchema
void assertSameSchema(FieldInfo fi)
-
-