Interface MapperPlugin


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

    • 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 Details

    • 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.

    • getRuntimeFields

      default Map<String,RuntimeField.Parser> getRuntimeFields()
      Returns the runtime field implementations added by this plugin.

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

    • getMetadataMappers

      default Map<String,MetadataFieldMapper.TypeParser> getMetadataMappers()
      Returns additional metadata mapper implementations added by this plugin.

      The key of the returned Map is the unique name for the metadata mapper, which is used in the mapping json to configure the metadata mapper, and the value is a MetadataFieldMapper.TypeParser to parse the mapper settings into a MetadataFieldMapper.

    • 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.