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

Merge FieldMapper and MappedFieldType #41058

Closed
jpountz opened this issue Apr 10, 2019 · 6 comments
Closed

Merge FieldMapper and MappedFieldType #41058

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

Comments

@jpountz
Copy link
Contributor

jpountz commented Apr 10, 2019

MappedFieldType had originally been split out of FieldMapper in order to work around problems that having multiple types in the same index introduced. Now that we introduced the guarantee that every index has at most one type, we could merge MappedFieldType and FieldMapper together.

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

Pinging @elastic/es-search

@jpountz
Copy link
Contributor Author

jpountz commented May 12, 2020

Both @javanna and @romseygeek are exploring features that wouldn't require doing anything at index time, they would only leverage MappedFieldType for search-time logic, so maybe we shouldn't merge actually?

@romseygeek
Copy link
Contributor

I think we could still do some re-organising here. For example, FieldMapper has the parseCreateField method on it which is used for indexing, while MappedFieldType has all the various xxxQuery methods on it, for searching - I think it might make sense for those to be the other way round?

@jtibshirani
Copy link
Contributor

jtibshirani commented May 12, 2020

A note that flattened fields currently take advantage of the FieldMapper/ MappedFieldType distinction. We create a new MappedFieldType on-the-fly inside FieldTypeLookup to support searches on the subfields. This new field type doesn't correspond to its own field in the mappings.

@romseygeek
Copy link
Contributor

I opened a separate issue for the re-organisation: #56814

I think we can close this one though?

@jtibshirani
Copy link
Contributor

Closing in favor of #56814, feel free to reopen if you disagree!

@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
>enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

6 participants