-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Improved error message when index field type is unknown #122860
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
Improved error message when index field type is unknown #122860
Conversation
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml
Outdated
Show resolved
Hide resolved
|
Do we need to update the error message for these places too? elasticsearch/server/src/main/java/org/elasticsearch/index/mapper/RuntimeField.java Line 182 in a59c182
The error message can be reproduced with this: elasticsearch/server/src/main/java/org/elasticsearch/index/mapper/TypeParsers.java Line 164 in 4ef5ea6
The error message can be reproduced with this: |
|
Hi @Samiul-TheSoccerFan, I've created a changelog YAML for you. |
Mikep86
left a comment
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.
Good catch on the other places this error is thrown, we need to update those as well and add tests for those cases.
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml
Outdated
Show resolved
Hide resolved
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml
Outdated
Show resolved
Hide resolved
|
Also, it's important to note that we don't backport enhancements to released stack versions (or stack versions after FF). Only bug fixes are eligible for backporting. |
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml
Show resolved
Hide resolved
|
Pinging @elastic/search-eng (Team:SearchOrg) |
|
Pinging @elastic/search-relevance (Team:Search - Relevance) |
|
@elasticmachine update branch |
Mikep86
left a comment
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.
Looking a lot better! Just a couple small things to clean up.
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml
Outdated
Show resolved
Hide resolved
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml
Outdated
Show resolved
Hide resolved
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/10_basic.yml
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java
Outdated
Show resolved
Hide resolved
|
@elasticmachine update branch |
Mikep86
left a comment
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.
LGTM, thanks for the iterations!
💔 Backport failed
You can use sqren/backport to manually backport by running |
|
@Samiul-TheSoccerFan Can you fix the backport PR? |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
… (#123311) * Improved error message when index field type is unknown (#122860) * Updating error message when index field type is unknown * Fix style issue * Add yaml test for invalid field type error message * Update docs/changelog/122860.yaml * Updating error message for runtime and multi field type parser * add and fix yaml tests * Fix code styles by running spotlessApply * Update changelog * Updatig the test in yml * Updating error message for runtime * Fix failing yaml tests * Update error message to Fix unit tests * fix serverless qa test --------- Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 5664f4f) # Conflicts: # server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java * remove changes from other PRs
Response with better error message if an index field type is invalid or unknown.
will now return the updated error message: