[Stable plugin api] Extensible annotation (#89903)

This commits adds an Extensible annotation aimed to mark things that can be loaded by a component loader.
It also marks Analyzer api components (AnalyzerFactory, CharFilterFactory, TokenFilterFactory and TokenizerFactory) with this annotation.

relates #88980
This commit is contained in:
Przemyslaw Gomulka 2022-09-09 10:41:27 +02:00 committed by GitHub
parent bae3284c69
commit 31cba2d085
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 32 additions and 4 deletions

View file

@ -9,11 +9,13 @@
package org.elasticsearch.plugin.analysis.api;
import org.apache.lucene.analysis.Analyzer;
import org.elasticsearch.plugin.api.Extensible;
import org.elasticsearch.plugin.api.Nameable;
/**
* An analysis component used to create Analyzers.
*/
@Extensible
public interface AnalyzerFactory extends Nameable {
/**
* Returns a lucene org.apache.lucene.analysis.Analyzer instance.

View file

@ -8,6 +8,7 @@
package org.elasticsearch.plugin.analysis.api;
import org.elasticsearch.plugin.api.Extensible;
import org.elasticsearch.plugin.api.Nameable;
import java.io.Reader;
@ -16,6 +17,7 @@ import java.io.Reader;
* An analysis component used to create char filters.
*
*/
@Extensible
public interface CharFilterFactory extends Nameable {
/**
* Wraps the given Reader with a CharFilter.

View file

@ -9,11 +9,13 @@
package org.elasticsearch.plugin.analysis.api;
import org.apache.lucene.analysis.TokenStream;
import org.elasticsearch.plugin.api.Extensible;
import org.elasticsearch.plugin.api.Nameable;
/**
* An analysis component used to create token filters.
*/
@Extensible
public interface TokenFilterFactory extends Nameable {
/**

View file

@ -9,11 +9,13 @@
package org.elasticsearch.plugin.analysis.api;
import org.apache.lucene.analysis.Tokenizer;
import org.elasticsearch.plugin.api.Extensible;
import org.elasticsearch.plugin.api.Nameable;
/**
* An analysis component used to create tokenizers.
*/
@Extensible
public interface TokenizerFactory extends Nameable {
/**