Class DynamicSchemaResolver

java.lang.Object
ddf.catalog.source.solr.DynamicSchemaResolver

public class DynamicSchemaResolver extends Object
This class tries to resolve all user given field names to their corresponding dynamic Solr index field name. This class takes most of its logic directly from the configured Solr schema.xml. For instance, the suffixes enumerated in this class are directly copied from the schema.xml.
Since:
0.2.0
  • Constructor Details

    • DynamicSchemaResolver

      public DynamicSchemaResolver(List<String> additionalFields)
    • DynamicSchemaResolver

      public DynamicSchemaResolver()
  • Method Details

    • addAdditionalFields

      public static void addAdditionalFields(DynamicSchemaResolver dynamicSchemaResolver, List<String> additionalFields)
    • addAdditionalFields

      public void addAdditionalFields(List<ddf.catalog.data.AttributeDescriptor> additionalFields)
    • addMetacardType

      public void addMetacardType(ddf.catalog.data.MetacardType metacardType)
    • getType

      public ddf.catalog.data.AttributeType.AttributeFormat getType(String solrFieldName)
      Returns the best approximation as to what AttributeType.AttributeFormat this Solr Field is.
      Parameters:
      solrFieldName - name of the Solr field
      Returns:
      the AttributeType.AttributeFormat associated with the Solr field
    • getMetacardType

      public ddf.catalog.data.MetacardType getMetacardType(org.apache.solr.common.SolrDocument doc) throws ddf.catalog.data.MetacardCreationException
      Throws:
      ddf.catalog.data.MetacardCreationException