Class CopyFieldDefinition

java.lang.Object
org.ametys.cms.search.solr.schema.CopyFieldDefinition
All Implemented Interfaces:
SchemaDefinition

public class CopyFieldDefinition extends Object implements SchemaDefinition
Represents a copy field definition in a solr schema.
  • Field Details

  • Constructor Details

    • CopyFieldDefinition

      public CopyFieldDefinition(String source, String destination)
      Build a copy field definition.
      Parameters:
      source - The source field.
      destination - The destination field.
    • CopyFieldDefinition

      public CopyFieldDefinition(Map<String,Object> attributes)
      Build a copy field definition from a map of attributes.
      Parameters:
      attributes - the Map of attributes.
  • Method Details

    • getSource

      public String getSource()
      Get the source field.
      Returns:
      The source field.
    • setSource

      public void setSource(String source)
      Set the source field.
      Parameters:
      source - the source field.
    • getDestination

      Get the destination field.
      Returns:
      The destination field.
    • setDestination

      public void setDestination(String destination)
      Set the destination field.
      Parameters:
      destination - the destination field.
    • getSchemaUpdate

      public org.apache.solr.client.solrj.request.schema.SchemaRequest.Update getSchemaUpdate()
      Description copied from interface: SchemaDefinition
      Get the schema request update.
      Specified by:
      getSchemaUpdate in interface SchemaDefinition
      Returns:
      The update request
    • exists

      public boolean exists(SchemaFields schemaFields)
      Description copied from interface: SchemaDefinition
      Test if the definition is already defined
      Specified by:
      exists in interface SchemaDefinition
      Parameters:
      schemaFields - the existing schema fields
      Returns:
      true if the definition is in the schema fields