-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] Inconsistency for create index between REST and CreateIndex #12775
Comments
Do you have a quick repro, is it reproduced in the previously released version(s)? |
Reason of inconsistency is due to the validation being present in rest layer and not in transport layer. Rest layer also wraps mapping properties with In core, transport actions which rely on mappings, should be made backward compatible to wrap mapping properties with |
@amitgalitz Did your PR address this issue? If yes, can we close this issue or are there any pending items left? |
Describe the bug
I am encountering inconsistencies between the rest API for create index and creating an index through the client in a plugin. When given the same mapping through the rest API create Index call and the client I get different responses. Specifically when using
client.admin().indices().create(createIndexRequest…
it fails if mappings doesn't have_doc
in it with:org.opensearch.index.mapper.MapperParsingException: Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [passage_text : {type=text}] [passage_embedding : {type=rank_features}] [id : {type=text}]
Related component
Indexing
To Reproduce
When I try to create a template with this mapping through REST API it works:
however when I provide same mapping to:
I get this exception:
when I try to create a mapping with the _doc field below _mappings through rest
however it succeeds with
client.admin().indices().create(createIndexRequest…
Expected behavior
_doc
shouldn't be required in 2.12 withclient.admin().indices().create()
Additional Details
No response
The text was updated successfully, but these errors were encountered: