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 Detail

      • getField

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

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

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

        Map<String,​Field> getFieldsByType​(FieldType type)
        get all fields that have the specified field type configured.
        Parameters:
        type -
        Returns:
      • 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 -
        usage -
        Returns:
      • 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 -
        Returns:
      • 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 -
        value -
        Returns: