Class SchemaFields


  • public class SchemaFields
    extends Object
    Represents the field names of a solr schema, mainly used to track existing fields.
    • Constructor Detail

      • SchemaFields

        public SchemaFields​(org.apache.solr.client.solrj.response.schema.SchemaRepresentation schemaRepresentation)
        Build a SchemaFields object from a SchemaRepresentation.
        Parameters:
        schemaRepresentation - The schema representation.
    • Method Detail

      • getFieldNames

        public Set<StringgetFieldNames()
        Get the simple field names.
        Returns:
        The simple field names.
      • hasField

        public boolean hasField​(String name)
        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

        public void addField​(String name)
        Add the given field name.
        Parameters:
        name - the field name to add.
      • hasDynamicField

        public boolean hasDynamicField​(String name)
        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

        public void addDynamicField​(String name)
        Add a dynamic field name.
        Parameters:
        name - the dynamic field name to add.
      • hasCopyField

        public boolean hasCopyField​(String source,
                                    String destination)
        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

        public void addCopyField​(String source,
                                 String destination)
        Add the given copy field.
        Parameters:
        source - The copy field source.
        destination - The copy field destination.
      • hasFieldType

        public boolean hasFieldType​(String name)
        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

        public void addFieldType​(String name)
        Add the given field type name.
        Parameters:
        name - the field type name to add.
      • initFields

        protected void initFields​(org.apache.solr.client.solrj.response.schema.SchemaRepresentation schema)
        Initialize the field names from the schema representation.
        Parameters:
        schema - The schema representation.