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