-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Detect when copying to a non-existent field when dynamic mappings are disabled #112812
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
Comments
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
Pinging @elastic/search-relevance (Team:Search - Relevance) |
Pinging @elastic/ent-search-eng (Team:SearchOrg) |
@Mikep86 could you please assign this issue to me? |
@Obolrom Great to hear you're interested in addressing this issue! Please feel free to submit a PR for this, but we don't officially assign tasks to community members. I highly doubt someone at Elastic will address this before you do though :) |
Hello! @Obolrom let me know if you're still interested in solving this issue. Otherwise, I would like to work on it. |
@henriquepaes1 |
Hello @Mikep86! I'm currently working on this issue. I found the "copy-to" verifications in the FieldMapper class in order to insert the non-existent field verification. However, I have a question: what is the expected behavior when dynamic mappings are enabled? |
@henriquepaes1 We expect the request to succeed in that case because the target field can be dynamically created. Note that I expect the solution to involve |
@Mikep86 I appreciate the prompt reply. I understood the expected behavior and what the solution should envolve, I'll work on that later today. |
@Mikep86 can you please review this and approve i tried to work on enhancement |
We do want to make sure that we pay attention to index templates. Example:
In this case the |
Hey @ioanatia thanks for pointing this out! I tested my solution with that case and while it worked fine, it raised some questions. 1- What is the difference between using the MappingLookup class and the FieldTypeLookup @Mikep86 mentioned a few comments above? |
Hi Mikep86, Can I work on this issue, I'm very new in terms on contributing to open-source, as far as I've understood, this is not resolved yet and has been marked with Thanks & Regards |
Hey Kunal, |
@henriquepaes1 are you still working on this issue? If not, would love to take this up. |
Hi Mikep86, Can I work on this issue. As I've understood, this is not resolved yet and has been marked with issue label. Kindly let me know if it's okay for me to pick this up. Thanks & Regards |
Description
We should be able to detect when a user is attempting to use
copy_to
to copy to a non-existent field when dynamic mappings are disabled. For example:Currently, this request succeeds even though nothing will ever be copied to
missing_field
. We should throw a 400 error in this case to indicate to the user that their mappings are invalid.The text was updated successfully, but these errors were encountered: