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

Use "order": -1 in default index template to allow override #3422

Merged
merged 1 commit into from Jan 25, 2017
Merged

Conversation

@joschi
Copy link
Contributor

@joschi joschi commented Jan 24, 2017

Description

The old "order" of Integer.MIN_VALUE didn't let users override index mappings
on their own because Elasticsearch seems to merge the templates in the wrong order.

Fun fact: Integer.MIN_VALUE and Integer.MIN_VALUE+1 don't work,
but Integer.MIN_VALUE+2 and higher do. Go figure.

The new value of "-1" seems a good compromise between working without breaking changes (like using "order": 0) and without too arbitrary magic numbers (like Integer.MIN_VALUE+2).

Fixes #3421

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
The old "order" of Integer.MIN_VALUE didn't let users override index mappings
on their own because Elasticsearch seems to merge the templates in the wrong order.

Fun fact: Integer.MIN_VALUE and Integer.MIN_VALUE+1 don't work,
but Integer.MIN_VALUE+2 and higher do. Go figure.

Fixes #3421
@joschi joschi added this to the 2.2.0 milestone Jan 24, 2017
Copy link
Member

@kroepke kroepke left a comment

lgtm!

@kroepke kroepke merged commit d16241f into master Jan 25, 2017
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
@kroepke kroepke deleted the issue-3421 branch Jan 25, 2017
kroepke added a commit that referenced this pull request Jan 25, 2017
The old "order" of Integer.MIN_VALUE didn't let users override index mappings
on their own because Elasticsearch seems to merge the templates in the wrong order.

Fun fact: Integer.MIN_VALUE and Integer.MIN_VALUE+1 don't work,
but Integer.MIN_VALUE+2 and higher do. Go figure.

Fixes #3421
(cherry picked from commit d16241f)
dennisoelkers added a commit that referenced this pull request Jan 25, 2017
…3426)

The old "order" of Integer.MIN_VALUE didn't let users override index mappings
on their own because Elasticsearch seems to merge the templates in the wrong order.

Fun fact: Integer.MIN_VALUE and Integer.MIN_VALUE+1 don't work,
but Integer.MIN_VALUE+2 and higher do. Go figure.

Fixes #3421
(cherry picked from commit d16241f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants