Skip to content

Conversation

@javanna
Copy link
Member

@javanna javanna commented Oct 2, 2020

MapperService carries a lot of weight and is only used to determine if loading of field data for the id field is enabled, which can be done in a different way. There was another usage that recently went away with the removal of TypeFieldMapper.

MapperService carries a lot of weight and is only used to determine if loading of field data for the id field is enabled, which can be done in a different way. There was another usage that recently went away with the removal of `TypeFieldMapper`.
@javanna javanna added :Search Foundations/Mapping Index mappings, including merging and defining field types >refactoring v8.0.0 labels Oct 2, 2020
@javanna javanna requested review from nik9000 and romseygeek October 2, 2020 15:09
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Mapping)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Oct 2, 2020
@javanna
Copy link
Member Author

javanna commented Oct 2, 2020

I would love to backport this to 7.x but I haven't come up with a way to get the type in TypeFieldMapper without requiring the function mapper service -> string . I thought there should be another way but it is probably not so straight-forward.

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @javanna

I opened #63214 to fix things in 7x so that we can backport this as well.

@javanna javanna merged commit ac93ca1 into elastic:master Oct 5, 2020
@javanna javanna added the v7.10.0 label Oct 5, 2020
romseygeek added a commit that referenced this pull request Oct 6, 2020
In 6x and 7x, indexes can have only one type, which means that we can rework
all queries against the type field to use a ConstantFieldType. This has already
been done in master with the removal of the TypeFieldMapper, but we still need
that class in 7x to deal with nested documents. This commit leaves
TypeFieldMapper in place, but refactors TypeFieldType to extend
ConstantFieldType and consolidates deprecation warnings within that class.

It also incidentally removes the requirement to pass a MapperService to
IndexFieldData.Builder#build, which should allow #63197 to be backported.
javanna added a commit to javanna/elasticsearch that referenced this pull request Oct 6, 2020
…tic#63197)

MapperService carries a lot of weight and is only used to determine if loading of field data for the id field is enabled, which can be done in a different way. There was another usage that recently went away with the removal of `TypeFieldMapper`.
javanna added a commit that referenced this pull request Oct 6, 2020
…) (#63311)

MapperService carries a lot of weight and is only used to determine if loading of field data for the id field is enabled, which can be done in a different way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>refactoring :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team v7.10.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants