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

Rename Mapper.Builder#name to leafName #109971

Merged
merged 4 commits into from
Jun 21, 2024

Conversation

javanna
Copy link
Member

@javanna javanna commented Jun 20, 2024

This addresses a long standing TODO that caused quite a few bugs over time, in that the mapper name does not include its full path, while the MappedFieldType name does.

This addresses a long standing TODO that caused quite a few bugs over time, in that the mapper name does not include its full path, while
the MappedFieldType name does.
@javanna javanna added :Search Foundations/Mapping Index mappings, including merging and defining field types >refactoring v8.15.0 labels Jun 20, 2024
@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Jun 20, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@javanna
Copy link
Member Author

javanna commented Jun 21, 2024

The serverless failure above does not seem related to the refactoring. Actually, seeing serverless compile with it is what I needed. I will go ahead and merge.

@javanna javanna merged commit 15c7abe into elastic:main Jun 21, 2024
15 of 16 checks passed
@javanna javanna deleted the refactoring/rename_mapper_name branch June 21, 2024 09:48
javanna added a commit to javanna/elasticsearch that referenced this pull request Jun 21, 2024
This addresses a long standing TODO that caused quite a few bugs over time, in that the mapper name does not include its full path, while
the MappedFieldType name does. We have method called simpleName to signal that, but leafName signals that more clearly and aligns with
the name we have recently introduced in Mapper.Builder (renamed from name to leafName).

Relates to elastic#109971
javanna added a commit that referenced this pull request Jun 21, 2024
This addresses a long standing TODO that caused quite a few bugs over time, in that the mapper name does not include its full path, while
the MappedFieldType name does. We have method called simpleName to signal that, but leafName signals that more clearly and aligns with
the name we have recently introduced in Mapper.Builder (renamed from name to leafName).

Relates to #109971
@javanna javanna changed the title Rename Mapper#name to Mapper#leafName Rename Mapper.Builder#name to leafName Jun 21, 2024
javanna added a commit to javanna/elasticsearch that referenced this pull request Jun 21, 2024
This addresses a long standing TODO that caused quite a few bugs over time, in that the mapper name does not include its full path, while the MappedFieldType name does.

We have renamed Mapper.Builder#name to leafName (elastic#109971) and Mapper#simpleName to leafName (elastic#110030). This commit renames Mapper#name to fullPath for clarity
This required some adjustments in FieldAliasMapper to avoid confusion between the existing path method and fullPath. I renamed path to targetPath for clarity.
ObjectMapper already had a fullPath method that returned name, and was effectively a copy of name, so it could be removed.
javanna added a commit that referenced this pull request Jun 21, 2024
This addresses a long standing TODO that caused quite a few bugs over time, in that the mapper name does not include its full path, while the MappedFieldType name does.

We have renamed Mapper.Builder#name to leafName (#109971) and Mapper#simpleName to leafName (#110030). This commit renames Mapper#name to fullPath for clarity
This required some adjustments in FieldAliasMapper to avoid confusion between the existing path method and fullPath. I renamed path to targetPath for clarity.
ObjectMapper already had a fullPath method that returned name, and was effectively a copy of name, so it could be removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking-java >refactoring :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team test-update-serverless v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants