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

Validation of mappings request to reject unsupported fields #7205

Closed
colings86 opened this issue Aug 8, 2014 · 0 comments · Fixed by #7534
Closed

Validation of mappings request to reject unsupported fields #7205

colings86 opened this issue Aug 8, 2014 · 0 comments · Fixed by #7534

Comments

@colings86
Copy link
Contributor

At the moment the mappings request is not validated to ensure that all the specified fields are valid for the particular mapping type. There are three types of field in a mapping field definition:

  • type field - single field which indicates which field mapper to use
  • common fields - fields which all types use (such as stored or indexed fields)
  • type specific fields - fields which are unique to the particular field mapper

These types are parsed separately and the parser for each does not know (and should not know) what the valid fields for the other parsers are. The solution is therefore for the parsers to remove the fields it processes and then a check to be made at the end to see if there are any fields which have not parsed If there are any fields not parsed, these should be returned in an thrown exception.

This functionality has already been implemented for the root mappings in #6093

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants