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

[Analysis] Deprecate standard html analyzer in 6.x #37292

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

johtani
Copy link
Contributor

@johtani johtani commented Jan 10, 2019

Deprecate standard_html_strip analyzer in 6.x

Related #4704

@johtani johtani added :Search/Analysis How text is split into tokens >deprecation labels Jan 10, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@johtani johtani force-pushed the remove_standard_html_analyzer_in_6x branch 2 times, most recently from b4a9850 to 76f6f09 Compare January 11, 2019 09:11
Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

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

I have one question, other than that LGTM - no need for another round.

@@ -136,6 +136,11 @@ public Analyzer getAnalyzer(String analyzer) throws IOException {
throw new ElasticsearchException("failed to load analyzer for name " + key, ex);
}}
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this part? I think just having the deprecation message in the AnalyzerProvider should be enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this part for this line.

analyzers.add(new PreBuiltAnalyzerProviderFactory("standard_html_strip", CachingStrategy.ELASTICSEARCH,

If Es find standard_html_strip from prebuiltAnalysis, Es doesn't use StandardHtmlStripAnalyzerProvider.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, ok. Can you move the deprecation message into the PreBuiltAnalyzerProviderFactory? Like

filters.add(PreConfiguredTokenFilter.singletonWithVersion("nGram", false, (reader, version) -> {

I'd rather not have specific analyzers referred to in the AnalysisRegistry if we can avoid it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I pushed it but it failed.
I think the timing to call create function is different between PreBuiltAnalyzerProviderFactory and PreConfiguredTokenFilter.
And I just remembered why I added check logic in AnalysisRegistry...

Copy link
Contributor

Choose a reason for hiding this comment

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

+1, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@romseygeek Thanks! I will revert last commit, then will merge it.

@johtani johtani force-pushed the remove_standard_html_analyzer_in_6x branch from a86619a to 76f6f09 Compare January 17, 2019 02:15
@johtani
Copy link
Contributor Author

johtani commented Jan 17, 2019

@elasticmachine test this please

1 similar comment
@johtani
Copy link
Contributor Author

johtani commented Jan 17, 2019

@elasticmachine test this please

@johtani johtani force-pushed the remove_standard_html_analyzer_in_6x branch from 76f6f09 to e942d63 Compare January 17, 2019 09:45
@johtani johtani force-pushed the remove_standard_html_analyzer_in_6x branch from e942d63 to 9828dd0 Compare January 18, 2019 06:52
@johtani johtani merged commit 9b51025 into elastic:6.x Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>deprecation :Search/Analysis How text is split into tokens v6.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants