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 intprivate DocValuesTypeprivate static Stringprivate IndexOptionsprivate final Stringprivate booleanprivate intprivate intprivate intprivate booleanprivate intprivate VectorEncodingprivate VectorSimilarityFunction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidassertSame(String label, boolean expected, boolean given) private voidassertSame(String label, int expected, int given) private <T extends Enum<?>>
voidassertSame(String label, T expected, T given) (package private) voidprivate voidraiseNotSame(String label, Object expected, Object given) (package private) voidreset(int doc) (package private) voidsetDocValues(DocValuesType newDocValuesType) (package private) voidsetIndexOptions(IndexOptions newIndexOptions, boolean newOmitNorms, boolean newStoreTermVector) (package private) voidsetPoints(int dimensionCount, int indexDimensionCount, int numBytes) (package private) voidsetVectors(VectorEncoding encoding, VectorSimilarityFunction similarityFunction, int dimension) (package private) voidupdateAttributes(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 -
vectorEncoding
-
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
void setVectors(VectorEncoding encoding, VectorSimilarityFunction similarityFunction, int dimension) -
reset
void reset(int doc) -
assertSameSchema
-