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
ConstructorDescriptionDynamicFieldDefinition
(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 TypeMethodDescriptionboolean
exists
(SchemaFields schemaFields) Test if the definition is already definedorg.apache.solr.client.solrj.request.schema.SchemaRequest.Update
Get 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
-true
if the field is multi-valued.docValues
-true
if 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
-true
if the field is multi-valued.docValues
-true
if the field is stored as docValues.indexed
-true
if the field is indexed.stored
-true
if 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:SchemaDefinition
Get the schema request update.- Specified by:
getSchemaUpdate
in interfaceSchemaDefinition
- Overrides:
getSchemaUpdate
in classFieldDefinition
- Returns:
- The update request
-
exists
Description copied from interface:SchemaDefinition
Test if the definition is already defined- Specified by:
exists
in interfaceSchemaDefinition
- Overrides:
exists
in classFieldDefinition
- Parameters:
schemaFields
- the existing schema fields- Returns:
true
if the definition is in the schema fields
-