Signed-off-by: dblock <dblock@amazon.com>
This commit is contained in:
parent
41e0ff9d6d
commit
2cf40be8ce
|
@ -60,14 +60,14 @@ import static java.util.Collections.emptyMap;
|
|||
* An additional extension point for {@link Plugin}s that extends OpenSearch's analysis functionality. To add an additional
|
||||
* {@link TokenFilter} just implement the interface and implement the {@link #getTokenFilters()} method:
|
||||
*
|
||||
* <pre>{@code
|
||||
* <pre>
|
||||
* public class AnalysisPhoneticPlugin extends Plugin implements AnalysisPlugin {
|
||||
* @Override
|
||||
* public Map<String, AnalysisProvider<TokenFilterFactory>> getTokenFilters() {
|
||||
* public Map<String, AnalysisProvider<TokenFilterFactory>> getTokenFilters() {
|
||||
* return singletonMap("phonetic", PhoneticTokenFilterFactory::new);
|
||||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
* </pre>
|
||||
*
|
||||
* OpenSearch doesn't have any automatic mechanism to share these components between indexes. If any component is heavy enough to warrant
|
||||
* such sharing then it is the Plugin's responsibility to do it in their {@link AnalysisProvider} implementation. We recommend against doing
|
||||
|
|
|
@ -49,14 +49,14 @@ import java.util.function.Supplier;
|
|||
* An additional extension point for {@link Plugin}s that extends OpenSearch's discovery functionality. To add an additional
|
||||
* {@link NetworkService.CustomNameResolver} just implement the interface and implement the {@link #getCustomNameResolver(Settings)} method:
|
||||
*
|
||||
* <pre>{@code
|
||||
* <pre>
|
||||
* public class MyDiscoveryPlugin extends Plugin implements DiscoveryPlugin {
|
||||
* @Override
|
||||
* public NetworkService.CustomNameResolver getCustomNameResolver(Settings settings) {
|
||||
* return new YourCustomNameResolverInstance(settings);
|
||||
* }
|
||||
* }
|
||||
* }</pre>
|
||||
* </pre>
|
||||
*/
|
||||
public interface DiscoveryPlugin {
|
||||
|
||||
|
|
Loading…
Reference in New Issue