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

Remove index_analyzer setting to simplify analyzer logic #9451

Merged
merged 1 commit into from Jan 28, 2015

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Jan 28, 2015

The analyzer setting is now the base setting, and search_analyzer
is simply an override of the search time analyzer. When setting
search_analyzer, analyzer must be set.

closes #9371

@rjernst rjernst added :Search/Mapping Index mappings, including merging and defining field types review labels Jan 28, 2015
builder.indexAnalyzer(getNamedAnalyzer(parserContext, fieldNode.toString()));
if (Fields.ANALYZER.equals(fieldName) ||
// for backcompat, reading old indexes, remove for v3.0
fieldName.equals("index_analyzer") && parserContext.indexVersionCreated().before(Version.V_2_0_0)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I was a bit confused that this is part of the if statement yet has the same indentation level that the block of code below. Maybe add 2 or 4 spaces of indentation here?

@jpountz
Copy link
Contributor

jpountz commented Jan 28, 2015

LGTM

Just left some notes about readability, feel free to push without further review.

The `analyzer` setting is now the base setting, and `search_analyzer`
is simply an override of the search time analyzer.  When setting
`search_analyzer`, `analyzer` must be set.

closes elastic#9371
@rjernst rjernst merged commit afcedb9 into elastic:master Jan 28, 2015
@rjernst rjernst removed the review label Jan 28, 2015
@rjernst rjernst deleted the fix/9371 branch March 24, 2015 03:04
@clintongormley clintongormley changed the title Mappings: Remove index_analyzer setting to simplify analyzer logic Remove index_analyzer setting to simplify analyzer logic Jun 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking :Search/Mapping Index mappings, including merging and defining field types v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify analyzer settings
3 participants