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

Types removal in 8.0 #41059

Closed
63 of 66 tasks
jpountz opened this issue Apr 10, 2019 · 7 comments
Closed
63 of 66 tasks

Types removal in 8.0 #41059

jpountz opened this issue Apr 10, 2019 · 7 comments
Assignees
Labels
blocker Meta :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v8.2.0

Comments

@jpountz
Copy link
Contributor

jpountz commented Apr 10, 2019

This is a meta issue that tracks things that must or should be done before 8.0 in order to finalize the removal of types.

Remaining:

Longer term:

MUST

SHOULD

KNOWN BUGS/ TRAPS

@jpountz jpountz added :Search Foundations/Mapping Index mappings, including merging and defining field types Meta labels Apr 10, 2019
@jpountz jpountz self-assigned this Apr 10, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@jtibshirani
Copy link
Contributor

I came across #24362 and am wondering if we should remove the _type field in 8.0 as well.

@jpountz
Copy link
Contributor Author

jpountz commented Apr 16, 2019

Added, thanks @jtibshirani.

@jtibshirani
Copy link
Contributor

@colings86 @jpountz just a note that I created a new section for 'known traps' to list surprises we encountered during the 7.x types removal effort that are good to be aware of.

@colings86
Copy link
Contributor

@jtibshirani thats a great idea, thanks

romseygeek added a commit that referenced this issue Sep 20, 2019
romseygeek added a commit that referenced this issue Sep 20, 2019
This commit removes types from the ShardGetService, and propagates this API change
up through the Transport and Rest actions for Get and MultiGet

Relates to #41059
romseygeek added a commit that referenced this issue Sep 23, 2019
Types are already not needed to retrieve documents; this commit removes
the now-redundant path elements in the GET _source API.

Relates to #41059
romseygeek added a commit that referenced this issue Sep 23, 2019
Type information is no longer useful for validating queries; this commit
removes the deprecated typed endpoints for this API.

Relates to #41059
romseygeek added a commit that referenced this issue Sep 23, 2019
We no longer need a type to get the source of a document, so we can remove it from
the explain API as well.

Relates to #41059
romseygeek added a commit that referenced this issue Sep 23, 2019
TermsLookup uses a GetRequest under the hood to load terms from a particular
document.  Now that GetRequests no longer use a type, we can remove types from
the TermsLookup object and terms query as well.

Relates to #41059
romseygeek pushed a commit that referenced this issue Sep 23, 2019
romseygeek added a commit that referenced this issue Sep 23, 2019
This commit removes the `_type` field from all search hit responses.

Relates to #41059
@rjernst rjernst added the Team:Search Meta label for search team label May 4, 2020
romseygeek added a commit that referenced this issue May 26, 2020
When we had multiple mapping types, an update to a field in one type had to be
propagated to the same field in all other types. This was done using the
Mapper.updateFieldType() method, called at the end of a merge. However, now
that we only have a single type per index, this method is unnecessary and can
be removed.

Relates to #41059
romseygeek added a commit to romseygeek/elasticsearch that referenced this issue May 26, 2020
When we had multiple mapping types, an update to a field in one type had to be
propagated to the same field in all other types. This was done using the
Mapper.updateFieldType() method, called at the end of a merge. However, now
that we only have a single type per index, this method is unnecessary and can
be removed.

Relates to elastic#41059
romseygeek added a commit that referenced this issue May 27, 2020
When we had multiple mapping types, an update to a field in one type had to be
propagated to the same field in all other types. This was done using the
Mapper.updateFieldType() method, called at the end of a merge. However, now
that we only have a single type per index, this method is unnecessary and can
be removed.

Relates to #41059
Backport of #56986
@jtibshirani
Copy link
Contributor

jtibshirani commented Jun 15, 2020

Longer term:

  • Remove String type parameter from all internal code, eg. MapperService.

My understanding is that in order to do this, we need to make sure mappings in cluster state don't contain a custom type name (held over from 7.x). Otherwise, we need some references to 'type' in internal code to load and parse these mappings correctly.

Have we decided to make this change for 8.0, and introduce some process where mappings get rewritten to use _doc (or no type at all)? I saw a reference to rewriting mappings in #51214. Or do we prefer to wait until 9.0, where we can force 7.x indices to be reindexed so that the mapping type is always _doc?

romseygeek added a commit that referenced this issue Sep 30, 2020
We don't need a special TypeFieldMapper for anything in particular; all access
to the type field can be done via a TypeFieldType that issues appropriate
deprecation warnings.

Relates to #41059
jtibshirani added a commit that referenced this issue Feb 5, 2021
Types are no longer allowed in requests in 8.0, so we can remove support for
using the `_type` field within a search request.

Relates to #41059.
Closes #68311.
@arteam arteam added v8.1.0 and removed v8.0.0 labels Jan 12, 2022
@mark-vieira mark-vieira added v8.2.0 and removed v8.1.0 labels Feb 2, 2022
@pugnascotia
Copy link
Contributor

@jpountz I assume we can close this now?

@javanna javanna added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch and removed Team:Search Meta label for search team labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Meta :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v8.2.0
Projects
None yet
Development

No branches or pull requests

10 participants