Class FieldConfigIndex

  • All Implemented Interfaces:
    FieldConfigAccess

    public final class FieldConfigIndex
    extends Object
    implements FieldConfigAccess
    Special class that cares about resolving the correct field configuration, especially for "the category field" and dynamic fields.
    • Constructor Detail

      • FieldConfigIndex

        public FieldConfigIndex​(FieldConfiguration fieldConfiguration)
        Constructor of the Field Index that prepares the given field configurations to match static and dynamic fields.
        Parameters:
        fieldConfiguration - full field configuration
    • Method Detail

      • getMatchingFields

        public Set<Field> getMatchingFields​(String fieldName)
        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)
        Specified by:
        getMatchingFields in interface FieldConfigAccess
        Parameters:
        fieldName -
        Returns:
      • getMatchingFields

        public 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.
        Specified by:
        getMatchingFields in interface FieldConfigAccess
        Parameters:
        fieldName -
        value -
        Returns:
      • getMatchingField

        public Optional<Field> getMatchingField​(String fieldName,
                                                Object value,
                                                FieldUsage usage)
        /** Similar to getMatchingField(String, Object) but additionally tries to generate a field configuration based on the dynamic fields. Those fields are then filtered by the specified FieldUsage.
        Parameters:
        fieldName -
        value -
        usage -
        Returns: