-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Modify removal_of_types.asciidoc #37648
Modify removal_of_types.asciidoc #37648
Conversation
After switching the default behaviour of "include_type_name" to "false" in 7.0, some parts of the types removal documentation can be adapted as well.
Pinging @elastic/es-search |
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.
@cbuescher Thanks Christoph. Some minor changes requested.
Also, Looks like the paragraph about include_type_name
in 7.x is incorrect, we should correct it as well. It says: "It defaults to true
.... Not setting include_type_name=false
will result in a deprecation
warning." But should say "It defaults to false
.... Using a parameter include_type_name
with either false
or true
value will result in a deprecation warning."
@@ -299,7 +301,7 @@ This first example splits our `twitter` index into a `tweets` index and a | |||
|
|||
[source,js] | |||
---- | |||
PUT users?include_type_name=true | |||
PUT users |
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.
should we remove _doc
type on line 310?
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.
I understand this example ment to be execute on either 5.6 or 6.x. to split a multiple-type index moving forward. So the new syntax doesn't apply there yet.
@@ -321,7 +323,7 @@ PUT users?include_type_name=true | |||
} | |||
} | |||
|
|||
PUT tweets?include_type_name=true | |||
PUT tweets |
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.
should we remove _doc
type on line 322?
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.
same reason as before
@@ -376,7 +378,7 @@ documents of different types which have conflicting IDs: | |||
|
|||
[source,js] | |||
---- | |||
PUT new_twitter?include_type_name=true | |||
PUT new_twitter |
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.
should we remove _doc
type on line 384?
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.
same reason as before
default in 8.0 when types are removed. Since the default for `include_type_name` | ||
is `false` starting with 7.0, you can omit using it after 7.0, but you can use | ||
it in case you want to temporarily force the legacy behaviour. | ||
|
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.
May be we can phrase this paragraph simpler, removing the sentence "When set to false
, this option enables the behavior that will become.."?
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.
Related to @mayya-sharipova's point, I think this whole paragraph will need to be reworked a bit, since we have changed the plan significantly since it was written:
- It is only index/ mapping APIs that support this parameter now (not document APIs).
- It would be good to mention that this parameter is introduced in 6.7 with a default of
true
, and then will be defaulted tofalse
in 7.0 and removed in 8.0. In particular, I think it is a little confusing to say 'When set tofalse
, this option enables the behavior that will become default in 8.0 when types are removed.'
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.
Thanks a lot @cbuescher for tackling this, I had been meaning to update this page after we revised the deprecation plan. Building on @mayya-sharipova's review, I think we should update the section on Schedule for removal of mapping types’ to mention that the
include_type_nameparameter will be introduced in 6.7 for mapping-related APIs, default to
false` in 7.0, and be removed in 8.0.
I also think that we'll need to update the section on Document APIs
and also that we should likely add an additional section on some of the other deprecations (for example the 'explain endpoint changing from {index}/{type}/{id}/_explain
to {index}/_explain/{id}
). However, this would be totally fine for one of us to do in a subsequent PR if you'd like to keep this one scoped to include_type_name
.
@@ -157,22 +157,24 @@ GET twitter/tweet/_search | |||
---- | |||
// NOTCONSOLE | |||
|
|||
Note the use of the `include_type_name=true` url parameter on index creation. | |||
This is necessary as the use of types is deprecated in 7.0. In this example |
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.
Small suggestion: instead of 'This is necessary as the use of types is deprecated in 7.0.', we could say 'This is necessary because index creation requests are typeless by default in 7.0.'
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.
Actually, now thinking about it, the example uses two types still and is only there to exemplify the "old" syntax. It shoudln't use "include_type_names" at all and is also not run in the tests (//NOTCONSOLE) so I think we should remove this note again and also remove the parameter here, since it can only work in 5.6 indices this way.
default in 8.0 when types are removed. Since the default for `include_type_name` | ||
is `false` starting with 7.0, you can omit using it after 7.0, but you can use | ||
it in case you want to temporarily force the legacy behaviour. | ||
|
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.
Related to @mayya-sharipova's point, I think this whole paragraph will need to be reworked a bit, since we have changed the plan significantly since it was written:
- It is only index/ mapping APIs that support this parameter now (not document APIs).
- It would be good to mention that this parameter is introduced in 6.7 with a default of
true
, and then will be defaulted tofalse
in 7.0 and removed in 8.0. In particular, I think it is a little confusing to say 'When set tofalse
, this option enables the behavior that will become default in 8.0 when types are removed.'
@mayya-sharipova @jtibshirani thanks for the comments. I agree this page should be reworked again after we finish the deprecation work. The changes I made were intended to only target the use of "include_type_name=true" in the documentation snippets. Since it is unclear for several code snippets which ES version they are meant to be run on (some use two type-names still) I think we should generally stick with the old typed request bodies in most places. I updated the PR accordingly. Please take another look. |
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.
This looks good to me as well, with the understanding that one of us will rework this documentation in a follow-up.
@cbuescher thanks Christoph, LGTM |
…ead-de-duplication * elastic/master: (24 commits) [TEST] Mute MlMappingsUpgradeIT testMappingsUpgrade Streamline skip_unavailable handling (elastic#37672) Only bootstrap and elect node in current voting configuration (elastic#37712) Ensure either success or failure path for SearchOperationListener is called (elastic#37467) Target only specific index in update settings test Add a note how to benchmark Elasticsearch Don't use Groovy's `withDefault` (elastic#37726) Adapt SyncedFlushService (elastic#37691) Mute FilterAggregatorTests#testRandom Switch mapping/aggregations over to java time (elastic#36363) [ML] Update ML results mappings on process start (elastic#37706) Modify removal_of_types.asciidoc (elastic#37648) Fix edge case in PutMappingRequestTests (elastic#37665) Use new bulk API endpoint in the docs (elastic#37698) Expose sequence number and primary terms in search responses (elastic#37639) Remove LicenseServiceClusterNotRecoveredTests (elastic#37528) Migrate SpecificMasterNodesIT to Zen2 (elastic#37532) Fix MetaStateFormat tests Use plain text instead of latexmath Fix a typo in a warning message in TestFixturesPlugin (elastic#37631) ...
After switching the default behaviour of "include_type_name" to "false" in 7.0,
some parts of the types removal documentation can be adapted as well.