Skip to content
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

Stop using cached component in _analyze API #19929

Merged

Conversation

johtani
Copy link
Contributor

@johtani johtani commented Aug 10, 2016

Stop calling tokenizer/tokenFilters/charFilter method of IndexService
Add some getAnalysisProvider methods
Change SynonymTokenFilterFactory constructor

Closes #19827

Stop calling tokenizer/tokenFilters/chaFilter method of IndexService
Add some getAnalysisProvider methods
Change SynonymTokenFilterFactory constructor

Closes elastic#19827
@johtani johtani added :Search/Analysis How text is split into tokens v5.0.0-beta1 review labels Aug 10, 2016
@nik9000 nik9000 self-assigned this Aug 11, 2016
@nik9000
Copy link
Member

nik9000 commented Aug 11, 2016

I'll review it!

final Map<String, TokenFilterFactory> tokenFilterFactories = buildMapping(false, "tokenfilter", indexSettings, tokenFiltersSettings, Collections.unmodifiableMap(tokenFilters), prebuiltAnalysis.tokenFilterFactories);
final Map<String, AnalyzerProvider<?>> analyzierFactories = buildMapping(true, "analyzer", indexSettings, analyzersSettings,
analyzers, prebuiltAnalysis.analyzerProviderFactories);
return new AnalysisService(indexSettings, analyzierFactories, tokenizerFactories, charFilterFactories, tokenFilterFactories);
}


public AnalysisProvider<TokenizerFactory> getTokenizerProvider(String tokenizer, IndexSettings indexSettings) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be nice to have javadoc for these so it is clear to the casual observer that they are for building the provider in the context of some index's settings.

@nik9000
Copy link
Member

nik9000 commented Aug 11, 2016

LGTM - I asked for some javadoc but I'm happy for you to add that javadoc and merge whenever you get the chance!

@johtani johtani merged commit 8d4bc0b into elastic:master Aug 12, 2016
@johtani
Copy link
Contributor Author

johtani commented Aug 12, 2016

@nik9000 Thx for reviewing! I added the javadoc.

@nik9000
Copy link
Member

nik9000 commented Aug 12, 2016

Thanks for the cleanup!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants