Interface FieldConfigAccess

All Known Implementing Classes:
FieldConfigIndex

public interface FieldConfigAccess
A interface that is implemented by OCS, to give quick and easy access to the configured fields.
  • Method Details

    • getField

      Optional<Field> getField(String fieldName)
      Get field by unique field name.
      Parameters:
      fieldName - unique field name
      Returns:
      optional matching field
    • getPrimaryCategoryField

      Optional<Field> getPrimaryCategoryField()
      Get field configuration that should be used for the "Categories" property of the documents.
      Returns:
      optional matching field
    • getFieldsByUsage

      Map<String,Field> getFieldsByUsage(FieldUsage usage)
      Get all fields that have the specified usage configured.
      Parameters:
      usage - filter criterion
      Returns:
      matching fields
    • getFieldsByType

      Map<String,Field> getFieldsByType(FieldType type)
      get all fields that have the specified field type configured.
      Parameters:
      type - filter criterion
      Returns:
      matching fields
    • getMatchingField

      Optional<Field> getMatchingField(String fieldName, FieldUsage usage)
      Get field with that name and the specified usage. If this does not exist, a empty result will be returned.
      Parameters:
      fieldName - could match any source-field name
      usage - filter criterion
      Returns:
      optional matching field
    • getMatchingFields

      Set<Field> getMatchingFields(String name)
      Get all fields that have the the specified name as field-name or source-field. If source-fields are not given at initialization (such at the search service), this function works similar to getField(String)
      Parameters:
      name - could match any source-field name
      Returns:
      matching fields
    • getMatchingFields

      Set<Field> getMatchingFields(String fieldName, Object value)
      Similar to getMatchingField(String) but additionally tries to generate a field configuration based on the dynamic fields. If no dynamic fields are configured (such as at the search-service), no field configs are generated.
      Parameters:
      fieldName - could match any source-field
      value - filter criterion
      Returns:
      matching fields