java.lang.Object
org.apache.lucene.index.FieldInfos.FieldNumbers
- Enclosing class:
FieldInfos
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String, FieldInfos.FieldDimensions> private final Map<String, DocValuesType> private final Map<String, IndexOptions> private intprivate final IntObjectHashMap<String> private final Stringprivate final Stringprivate final booleanprivate final Map<String, FieldInfos.FieldVectorProperties> -
Constructor Summary
ConstructorsConstructorDescriptionFieldNumbers(String softDeletesFieldName, String parentFieldName, int indexCreatedVersionMajor) -
Method Summary
Modifier and TypeMethodDescription(package private) intReturns the global field number for the given field name.(package private) voidclear()(package private) FieldInfoconstructFieldInfo(String fieldName, DocValuesType dvType, int newFieldNumber) Construct a new FieldInfo based on the options in global field numbers.(package private) voidsetDocValuesType(int number, String name, DocValuesType dvType) (package private) voidverifyConsistent(Integer number, String name, DocValuesType dvType) (package private) void(package private) voidverifyOrCreateDvOnlyField(String fieldName, DocValuesType dvType, boolean fieldMustExist) This function is called fromIndexWriterto verify if doc values of the field can be updated.private voidverifyParentFieldName(String fieldName, boolean isParentField) private voidprivate voidverifySoftDeletedFieldName(String fieldName, boolean isSoftDeletesField)
-
Field Details
-
numberToName
-
nameToNumber
-
indexOptions
-
docValuesType
-
dimensions
-
vectorProps
-
omitNorms
-
storeTermVectors
-
lowestUnassignedFieldNumber
private int lowestUnassignedFieldNumber -
softDeletesFieldName
-
strictlyConsistent
private final boolean strictlyConsistent -
parentFieldName
-
-
Constructor Details
-
FieldNumbers
-
-
Method Details
-
verifyFieldInfo
-
addOrGet
Returns the global field number for the given field name. If the name does not exist yet it tries to add it with the given preferred field number assigned if possible otherwise the first unassigned field number is used as the field number. -
verifySoftDeletedFieldName
-
verifyParentFieldName
-
verifySameSchema
-
verifyOrCreateDvOnlyField
This function is called fromIndexWriterto verify if doc values of the field can be updated. If the field with this name already exists, we verify that it is doc values only field. If the field doesn't exists and the parameter fieldMustExist is false, we create a new field in the global field numbers.- Parameters:
fieldName- - name of the fielddvType- - expected doc values typefieldMustExist- – if the field must exist.- Throws:
IllegalArgumentException- if the field must exist, but it doesn't, or if the field exists, but it is not doc values only field with the provided doc values type.
-
constructFieldInfo
Construct a new FieldInfo based on the options in global field numbers. This method is not synchronized as all the options it uses are not modifiable.- Parameters:
fieldName- name of the fielddvType- doc values typenewFieldNumber- a new field number- Returns:
nulliffieldNamedoesn't exist in the map or is not of the samedvTypereturns a new FieldInfo based based on the options in global field numbers
-
setDocValuesType
-
verifyConsistent
-
getFieldNames
-
clear
void clear()
-