/* * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 * * The OpenSearch Contributors require contributions made to * this file be licensed under the Apache-2.0 license or a * compatible open source license. */ package org.opensearch.sdk.api; import org.opensearch.index.mapper.Mapper; import org.opensearch.index.mapper.MetadataFieldMapper; import org.opensearch.sdk.Extension; import java.util.Collections; import java.util.Map; import java.util.function.Function; import java.util.function.Predicate; /** * An extension point for {@link Extension} implementations to add custom mappers */ public interface MapperExtension { /** * Returns additional mapper implementations added by this extension. *
* The key of the returned {@link Map} is the unique name for the mapper which will be used
* as the mapping {@code type}, and the value is a {@link Mapper.TypeParser} to parse the
* mapper settings into a {@link Mapper}.
* @return a map of unique mapper names to their corresponding type parsers.
*/
default Map
* The key of the returned {@link 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
* {@link MetadataFieldMapper.TypeParser} to parse the mapper settings into a
* {@link MetadataFieldMapper}.
* @return a map of metadata mapper names to their corresponding type parsers.
*/
default Map