-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Indexing completion type fields with multi-fields fails #15115
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
Hi @underyx Completion fields shouldn't support multi-fields, because a completion field can accept a structured object which wouldn't work with (eg) a |
I see, thank you, @clintongormley! |
@elastic/es-search-aggs |
Hi, It is however still possible to create a mapping with multi-fields of type completion. Should this be prevented?
See gist with curl requests and responses |
Creating documents on mappings with completion type fields with multi-fields fails when the document is provided with completion field in a form of array or object. This is because sub multi-field of different then completion type is not able to parse that format.
Sub multi-field of type completion, fails due to reusing a context with a parser being already at the end of the object.
The issue was initially created to prevent mappings with completion type fields with multi-field. However we already support that, it works fine when indexing document with completion type field in String format.
It is possible to fix that by modifying the CompletionFieldMapper to provide multiFields mapper with a context with already parsed externalValue. Also The CompletionFieldMapper itself, should support externalValues from context (it is not at the moment) |
Mappings with completion type and multi-fields, were not able to index array or object format on completion fields. Only string format was supproted. This is fixed by providing multiField parser with externalValueContext with already parsed object closes elastic#15115
Mappings with completion type and multi-fields, were not able to index array or object format on completion fields. Only string format was supported. This is fixed by providing multiField parser with externalValueContext with already parsed object closes #15115
Mappings with completion type and multi-fields, were not able to index array or object format on completion fields. Only string format was supported. This is fixed by providing multiField parser with externalValueContext with already parsed object closes elastic#15115
) Mappings with completion type and multi-fields, were not able to index array or object format on completion fields. Only string format was supported. This is fixed by providing multiField parser with externalValueContext with already parsed object * Adapt test after backport of #34081 closes #15115
Mappings with completion type and multi-fields, were not able to index array or object format on completion fields. Only string format was supported. This is fixed by providing multiField parser with externalValueContext with already parsed object closes #15115
Edit: As it turns out, the issue I originally had was expected behavior, but it would be better if mappings like this would be rejected when someone tries to set them, so I'm leaving the original issue text below:
I'm trying to specify a field like this in 2.1.0:
Indexing seems to be okay, but when searching, I get an error saying that
"Field [city.analyzed] is not a completion suggest field"
. Am I wrong to expect this to work?The text was updated successfully, but these errors were encountered: