Class SchemaFields
java.lang.Object
org.ametys.cms.search.solr.schema.SchemaFields
Represents the field names of a solr schema, mainly used to track existing fields.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Set<CopyFieldId>
The copy field ids.The dynamic field names.The simple field names.The field type names. -
Constructor Summary
ConstructorDescriptionSchemaFields
(org.apache.solr.client.solrj.response.schema.SchemaRepresentation schemaRepresentation) Build a SchemaFields object from aSchemaRepresentation
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCopyField
(String source, String destination) Add the given copy field.void
addDynamicField
(String name) Add a dynamic field name.void
Add the given field name.void
addFieldType
(String name) Add the given field type name.Get the copy field ids.Get the dynamic field names.Get the simple field names.Get the field types.boolean
hasCopyField
(String source, String destination) Test if the schema contains the given copy field.boolean
hasDynamicField
(String name) Test if the schema contains the given dynamic field.boolean
Test if the schema contains the given simple field.boolean
hasFieldType
(String name) Test if the schema contains the given field type.protected void
initFields
(org.apache.solr.client.solrj.response.schema.SchemaRepresentation schema) Initialize the field names from the schema representation.toString()
-
Field Details
-
_fieldNames
The simple field names. -
_dynFieldNames
The dynamic field names. -
_copyFieldIds
The copy field ids. -
_fieldTypeNames
The field type names.
-
-
Constructor Details
-
SchemaFields
public SchemaFields(org.apache.solr.client.solrj.response.schema.SchemaRepresentation schemaRepresentation) Build a SchemaFields object from aSchemaRepresentation
.- Parameters:
schemaRepresentation
- The schema representation.
-
-
Method Details
-
getFieldNames
Get the simple field names.- Returns:
- The simple field names.
-
hasField
Test if the schema contains the given simple field.- Parameters:
name
- The field name to test.- Returns:
- true if the schema contains the given simple field.
-
addField
Add the given field name.- Parameters:
name
- the field name to add.
-
getDynamicFieldNames
Get the dynamic field names.- Returns:
- The dynamic field names.
-
hasDynamicField
Test if the schema contains the given dynamic field.- Parameters:
name
- The dynamic field name to test.- Returns:
- true if the schema contains the given dynamic field.
-
addDynamicField
Add a dynamic field name.- Parameters:
name
- the dynamic field name to add.
-
getCopyFieldIds
Get the copy field ids.- Returns:
- The copy field ids.
-
hasCopyField
Test if the schema contains the given copy field.- Parameters:
source
- The copy field source.destination
- The copy field destination.- Returns:
- true if the schema contains the given copy field.
-
addCopyField
Add the given copy field.- Parameters:
source
- The copy field source.destination
- The copy field destination.
-
getFieldTypeNames
Get the field types.- Returns:
- The field types.
-
hasFieldType
Test if the schema contains the given field type.- Parameters:
name
- The field type name to test.- Returns:
- true if the schema contains the given field type.
-
addFieldType
Add the given field type name.- Parameters:
name
- the field type name to add.
-
toString
-
initFields
Initialize the field names from the schema representation.- Parameters:
schema
- The schema representation.
-