Class DynamicFieldDefinition
java.lang.Object
org.ametys.cms.search.solr.schema.FieldDefinition
org.ametys.cms.search.solr.schema.DynamicFieldDefinition
- All Implemented Interfaces:
SchemaDefinition
Represents a dynamic field definition in a solr schema.
-
Field Summary
Fields inherited from class org.ametys.cms.search.solr.schema.FieldDefinition
_docValues, _indexed, _multiValued, _name, _stored, _type -
Constructor Summary
ConstructorsConstructorDescriptionDynamicFieldDefinition(String name, String type, boolean multiValued, boolean docValues) Build a dynamic field definition, indexed and stored.DynamicFieldDefinition(String name, String type, boolean multiValued, boolean docValues, boolean indexed, boolean stored) Build a dynamic field definition.DynamicFieldDefinition(Map<String, Object> attributes) Build a dynamic field definition from a map of attributes. -
Method Summary
Modifier and TypeMethodDescriptionbooleanexists(SchemaFields schemaFields) Test if the definition is already definedorg.apache.solr.client.solrj.request.schema.SchemaRequest.UpdateGet the schema request update.Methods inherited from class org.ametys.cms.search.solr.schema.FieldDefinition
_getAttributes, getName, getType, isDocValues, isIndexed, isMultiValued, isStored, setDocValues, setIndexed, setMultiValued, setName, setStored, setType
-
Constructor Details
-
DynamicFieldDefinition
Build a dynamic field definition, indexed and stored.- Parameters:
name- The field name, can contain a star character to represent a dynamic field (i.e. *_type).type- The field type.multiValued-trueif the field is multi-valued.docValues-trueif the field is stored as docValues.
-
DynamicFieldDefinition
public DynamicFieldDefinition(String name, String type, boolean multiValued, boolean docValues, boolean indexed, boolean stored) Build a dynamic field definition.- Parameters:
name- The field name, can contain a star character to represent a dynamic field (i.e. *_type).type- The field type.multiValued-trueif the field is multi-valued.docValues-trueif the field is stored as docValues.indexed-trueif the field is indexed.stored-trueif the field is stored.
-
DynamicFieldDefinition
Build a dynamic field definition from a map of attributes.- Parameters:
attributes- the Map of attributes.
-
-
Method Details
-
getSchemaUpdate
Description copied from interface:SchemaDefinitionGet the schema request update.- Specified by:
getSchemaUpdatein interfaceSchemaDefinition- Overrides:
getSchemaUpdatein classFieldDefinition- Returns:
- The update request
-
exists
Description copied from interface:SchemaDefinitionTest if the definition is already defined- Specified by:
existsin interfaceSchemaDefinition- Overrides:
existsin classFieldDefinition- Parameters:
schemaFields- the existing schema fields- Returns:
trueif the definition is in the schema fields
-