Package org.apache.solr.schema
Class AbstractEnumField.EnumMapping
java.lang.Object
org.apache.solr.schema.AbstractEnumField.EnumMapping
- Enclosing class:
AbstractEnumField
Models all the info contained in an enums config XML file
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEnumMapping(IndexSchema schema, FieldType fieldType, Map<String, String> args) Takes in a FieldType and the initArgs Map used for that type, removing the keys that specify the enum. -
Method Summary
Modifier and TypeMethodDescriptionintValueToStringValue(Integer intVal) Converting the (internal) integer value (indicating the sort order) to string (displayed) valuestringValueToIntValue(String stringVal) Converting the string (displayed) value (internal) to integer value (indicating the sort order)
-
Field Details
-
PARAM_ENUMS_CONFIG
- See Also:
-
PARAM_ENUM_NAME
- See Also:
-
DEFAULT_VALUE
-
enumStringToIntMap
-
enumIntToStringMap
-
-
Constructor Details
-
EnumMapping
Takes in a FieldType and the initArgs Map used for that type, removing the keys that specify the enum.- Parameters:
schema- for opening resourcesfieldType- Used for logging or error messagesargs- the init args to consume the enum name + config file from
-
-
Method Details
-
intValueToStringValue
Converting the (internal) integer value (indicating the sort order) to string (displayed) value- Parameters:
intVal- integer value- Returns:
- string value
-
stringValueToIntValue
Converting the string (displayed) value (internal) to integer value (indicating the sort order)- Parameters:
stringVal- string value- Returns:
- integer value
-