-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Only allow one type on 6.0 indices #24317
Conversation
When `false`, indices are not allowed to have more than one type. This property is `false` by default for indices created on or after 7.0 and `true` by default on older versions. Most of the change is about fixing tests that created multiple types to either create a single `_type` instead or enable the `_type` mapper. Relates elastic#15613
Note to reviewers: the PR is a bit large but you can focus on changes in |
@martijnvg @jimczi Maybe you could have a look since it is a bit related to #20257. What I have been doing for now with parent/child tests was just to enable the |
I think maybe having this on |
@rjernst good point - i'm happy to go with an index setting |
I'll go with |
Done. I actually went with |
enabled
property on _type
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I will merge this PR with a default value of |
This adds the `index.mapping.single_type` setting, which enforces that indices have at most one type when it is true. The default value is `false`. Relates #15613
This is a follow-up to elastic#24317, which did the hard work but was merged in such a way that it exposes the setting while still allowing indices to have multiple types by default in order to give time to people who test against master to add this setting to their index settings.
Removing the |
This is a follow-up to #24317, which did the hard work but was merged in such a way that it exposes the setting while still allowing indices to have multiple types by default in order to give time to people who test against master to add this setting to their index settings.
I have a question。 now my index and type used like this, bussiness_index/2017-11-12,bussiness_index/2017-11-13. just one index and more type.the type was every date string, and each type store the data of that day. when only one type in a index, how can i change my index structure?? |
You cannot change the index structure in a single type. This kind of problem is typically solved by having time-based indices rather than types. Note: please use discuss.elastic.co to ask questions rather than Github. |
…sion > 5.5.0 It was only added in #24317
This adds the
index.mapping.single_type
setting, which enforces that indiceshave at most one type when it is true. The default value is true for 6.0+ indices
and false for old indices.
Most of the change is about fixing tests that created multiple types to either
create a single
_type
instead or setindex.mapping.single_type
tofalse
(eg. for parent/child tests, which still require multiple types).
Relates #15613