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

Removes support for adding aliases to analyzers #19994

Merged
merged 1 commit into from
Aug 15, 2016

Conversation

abeyad
Copy link

@abeyad abeyad commented Aug 15, 2016

Removes support for adding aliases to analyzers. Indices created pre 5.x
that have analyzer aliases in their analysis settings will still work, but
any attempts to create an alias for analyzers in newly created indices
will result in an IllegalArgumentException.

As a result, the setting index.analysis.analyzer.{analyzerName}.alias is
no longer supported.

Note that the documentation for this setting was already removed in #18269.

Closes #18244

@@ -332,7 +346,8 @@ public void testUnderscoreInAnalyzerNameAlias() throws IOException {
.put("index.analysis.analyzer.valid_name.tokenizer", "keyword")
.put("index.analysis.analyzer.valid_name.alias", "_invalid_name")
.put(Environment.PATH_HOME_SETTING.getKey(), createTempDir().toString())
.put(IndexMetaData.SETTING_VERSION_CREATED, "1")
// analyzer aliases are only allowed for indices created in v5.0 alpha5 or before
.put(IndexMetaData.SETTING_VERSION_CREATED, VersionUtils.randomVersionBetween(random(), null, Version.V_5_0_0_alpha5))
Copy link
Member

Choose a reason for hiding this comment

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

We don't explicitly support upgrading between alphas. Can you test this with a 2.x version instead? I would use VersionUtils.getPreviousVersion(Version.V_5_0_0_alpha1)

@rjernst
Copy link
Member

rjernst commented Aug 15, 2016

LGTM

that have analyzer aliases in their analysis settings will still work, but
any attempts to create an alias for analyzers in newly created indices
will result in an IllegalArgumentException.

As a result, the setting `index.analysis.analyzer.{analyzerName}.alias` is
no longer supported.

Closes elastic#18244
@abeyad
Copy link
Author

abeyad commented Aug 15, 2016

@rjernst thanks for the review! I changed the tests to pick a random 2.x version.

@abeyad abeyad merged commit 5ba06b6 into elastic:master Aug 15, 2016
@abeyad abeyad deleted the remove-analyzer-alias branch August 15, 2016 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants