Interface MapperPlugin


  • public interface MapperPlugin
    An extension point for Plugin implementations to add custom mappers
    • Field Detail

      • NOOP_FIELD_PREDICATE

        static final Predicate<String> NOOP_FIELD_PREDICATE
        The default field predicate applied, which doesn't filter anything. That means that by default get mappings, get index get field mappings and field capabilities API will return every field that's present in the mappings.
      • NOOP_FIELD_FILTER

        static final Function<String,​Predicate<String>> NOOP_FIELD_FILTER
        The default field filter applied, which doesn't filter anything. That means that by default get mappings, get index get field mappings and field capabilities API will return every field that's present in the mappings.
    • Method Detail

      • getMappers

        default Map<String,​Mapper.TypeParser> getMappers()
        Returns additional mapper implementations added by this plugin.

        The key of the returned Map is the unique name for the mapper which will be used as the mapping type, and the value is a Mapper.TypeParser to parse the mapper settings into a Mapper.

      • getFieldFilter

        default Function<String,​Predicate<String>> getFieldFilter()
        Returns a function that given an index name returns a predicate which fields must match in order to be returned by get mappings, get index, get field mappings and field capabilities API. Useful to filter the fields that such API return. The predicate receives the field name as input argument and should return true to show the field and false to hide it.