-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading analysis plugins fails #5030
Labels
Comments
ghost
assigned dadoonet
Feb 5, 2014
dadoonet
added a commit
to dadoonet/elasticsearch
that referenced
this issue
Feb 7, 2014
When an analysis plugins provides default index settings using `PreBuiltAnalyzerProviderFactory`, `PreBuiltTokenFilterFactoryFactory` or `PreBuiltTokenizerFactoryFactory` it fails when upgrading it with elasticsearch superior or equal to 0.90.5. Related issue: elastic#4936 Fix is needed in core. But, in the meantime, analysis plugins developers can fix that issue by overloading default prebuilt factories. For example: ```java public class StempelAnalyzerProviderFactory extends PreBuiltAnalyzerProviderFactory { private final PreBuiltAnalyzerProvider analyzerProvider; public StempelAnalyzerProviderFactory(String name, AnalyzerScope scope, Analyzer analyzer) { super(name, scope, analyzer); analyzerProvider = new PreBuiltAnalyzerProvider(name, scope, analyzer); } @OverRide public AnalyzerProvider create(String name, Settings settings) { return analyzerProvider; } public Analyzer analyzer() { return analyzerProvider.get(); } } ``` And instead of: ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new PreBuiltAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` do ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new StempelAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` Closes elastic#5030
dadoonet
added a commit
that referenced
this issue
Feb 7, 2014
When an analysis plugins provides default index settings using `PreBuiltAnalyzerProviderFactory`, `PreBuiltTokenFilterFactoryFactory` or `PreBuiltTokenizerFactoryFactory` it fails when upgrading it with elasticsearch superior or equal to 0.90.5. Related issue: #4936 Fix is needed in core. But, in the meantime, analysis plugins developers can fix that issue by overloading default prebuilt factories. For example: ```java public class StempelAnalyzerProviderFactory extends PreBuiltAnalyzerProviderFactory { private final PreBuiltAnalyzerProvider analyzerProvider; public StempelAnalyzerProviderFactory(String name, AnalyzerScope scope, Analyzer analyzer) { super(name, scope, analyzer); analyzerProvider = new PreBuiltAnalyzerProvider(name, scope, analyzer); } @OverRide public AnalyzerProvider create(String name, Settings settings) { return analyzerProvider; } public Analyzer analyzer() { return analyzerProvider.get(); } } ``` And instead of: ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new PreBuiltAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` do ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new StempelAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` Closes #5030
dadoonet
added a commit
that referenced
this issue
Feb 7, 2014
When an analysis plugins provides default index settings using `PreBuiltAnalyzerProviderFactory`, `PreBuiltTokenFilterFactoryFactory` or `PreBuiltTokenizerFactoryFactory` it fails when upgrading it with elasticsearch superior or equal to 0.90.5. Related issue: #4936 Fix is needed in core. But, in the meantime, analysis plugins developers can fix that issue by overloading default prebuilt factories. For example: ```java public class StempelAnalyzerProviderFactory extends PreBuiltAnalyzerProviderFactory { private final PreBuiltAnalyzerProvider analyzerProvider; public StempelAnalyzerProviderFactory(String name, AnalyzerScope scope, Analyzer analyzer) { super(name, scope, analyzer); analyzerProvider = new PreBuiltAnalyzerProvider(name, scope, analyzer); } @OverRide public AnalyzerProvider create(String name, Settings settings) { return analyzerProvider; } public Analyzer analyzer() { return analyzerProvider.get(); } } ``` And instead of: ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new PreBuiltAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` do ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new StempelAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` Closes #5030
dadoonet
added a commit
to elastic/elasticsearch-analysis-kuromoji
that referenced
this issue
Feb 28, 2014
Due to fix [3790](elastic/elasticsearch#3790) in core, upgrading an analyzer provided as a plugin now fails. See elastic/elasticsearch#5030 for details. Issue is in elasticsearch core code but can be fixed in plugins by overloading `PreBuiltAnalyzerProviderFactory`, `PreBuiltTokenFilterFactoryFactory`, `PreBuiltTokenizerFactoryFactory` or `PreBuiltCharFilterFactoryFactory ` when used. Closes #21 (cherry picked from commit 3401c21)
dadoonet
added a commit
to elastic/elasticsearch-analysis-kuromoji
that referenced
this issue
Feb 28, 2014
Due to fix [3790](elastic/elasticsearch#3790) in core, upgrading an analyzer provided as a plugin now fails. See elastic/elasticsearch#5030 for details. Issue is in elasticsearch core code but can be fixed in plugins by overloading `PreBuiltAnalyzerProviderFactory`, `PreBuiltTokenFilterFactoryFactory`, `PreBuiltTokenizerFactoryFactory` or `PreBuiltCharFilterFactoryFactory ` when used. Closes #21
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
When an analysis plugins provides default index settings using `PreBuiltAnalyzerProviderFactory`, `PreBuiltTokenFilterFactoryFactory` or `PreBuiltTokenizerFactoryFactory` it fails when upgrading it with elasticsearch superior or equal to 0.90.5. Related issue: elastic#4936 Fix is needed in core. But, in the meantime, analysis plugins developers can fix that issue by overloading default prebuilt factories. For example: ```java public class StempelAnalyzerProviderFactory extends PreBuiltAnalyzerProviderFactory { private final PreBuiltAnalyzerProvider analyzerProvider; public StempelAnalyzerProviderFactory(String name, AnalyzerScope scope, Analyzer analyzer) { super(name, scope, analyzer); analyzerProvider = new PreBuiltAnalyzerProvider(name, scope, analyzer); } @OverRide public AnalyzerProvider create(String name, Settings settings) { return analyzerProvider; } public Analyzer analyzer() { return analyzerProvider.get(); } } ``` And instead of: ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new PreBuiltAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` do ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new StempelAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` Closes elastic#5030
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
When an analysis plugins provides default index settings using `PreBuiltAnalyzerProviderFactory`, `PreBuiltTokenFilterFactoryFactory` or `PreBuiltTokenizerFactoryFactory` it fails when upgrading it with elasticsearch superior or equal to 0.90.5. Related issue: elastic#4936 Fix is needed in core. But, in the meantime, analysis plugins developers can fix that issue by overloading default prebuilt factories. For example: ```java public class StempelAnalyzerProviderFactory extends PreBuiltAnalyzerProviderFactory { private final PreBuiltAnalyzerProvider analyzerProvider; public StempelAnalyzerProviderFactory(String name, AnalyzerScope scope, Analyzer analyzer) { super(name, scope, analyzer); analyzerProvider = new PreBuiltAnalyzerProvider(name, scope, analyzer); } @OverRide public AnalyzerProvider create(String name, Settings settings) { return analyzerProvider; } public Analyzer analyzer() { return analyzerProvider.get(); } } ``` And instead of: ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new PreBuiltAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` do ```java @Inject public PolishIndicesAnalysis(Settings settings, IndicesAnalysisService indicesAnalysisService) { super(settings); indicesAnalysisService.analyzerProviderFactories().put("polish", new StempelAnalyzerProviderFactory("polish", AnalyzerScope.INDICES, new PolishAnalyzer(Lucene.ANALYZER_VERSION))); } ``` Closes elastic#5030
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When an analysis plugins provides default index settings using
PreBuiltAnalyzerProviderFactory
,PreBuiltTokenFilterFactoryFactory
,PreBuiltTokenizerFactoryFactory
orPreBuiltCharFilterFactoryFactory
it fails when upgrading it with elasticsearch superior or equal to 0.90.5.Related issue: #4936
Fix is needed in core. But, in the meantime, analysis plugins developers can fix that issue by overloading default prebuilt factories.
For example:
And instead of:
do
The text was updated successfully, but these errors were encountered: