-
Notifications
You must be signed in to change notification settings - Fork 25.5k
[Docs] Semantic field does not support object fields #114387
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
[Docs] Semantic field does not support object fields #114387
Conversation
Documentation preview: |
Pinging @elastic/es-docs (Team:Docs) |
Pinging @elastic/search-eng (Team:SearchOrg) |
Pinging @elastic/search-relevance (Team:Search - Relevance) |
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.
What's preventing the field to work inside object fields? We fail if the field is under a nested
object but normal objects should work fine. We have tests for this.
We're not overwriting correctly the object when calculating the inference. The following sequence: PUT test_semantic
PUT /test_semantic/_mapping
{
"properties": {
"level_1": {
"properties": {
"level_2": {
"type": "semantic_text",
"inference_id": "elser-endpoint"
}
}
}
}
}
POST test_semantic/_doc/0001
{
"level_1": {
"level_2": "text"
}
} results in an error: {
"error": {
"root_cause": [
{
"type": "document_parsing_exception",
"reason": "[1:29] failed to parse field [level_1.level_2] of type [semantic_text] in document with id '0001'. Preview of field's value: 'null'"
}
],
"type": "document_parsing_exception",
"reason": "[1:29] failed to parse field [level_1.level_2] of type [semantic_text] in document with id '0001'. Preview of field's value: 'null'",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "[1:29] [semantic_text] Expected START_OBJECT but was: END_OBJECT"
}
},
"status": 400
} I've been able to reproduce this locally.
We have tests for copy_to from object fields to (non-object) semantic fields here. I haven't found object tests on the inference tests. |
Oh that's a bug then! We should account for objects here? |
👍 That is correct. |
We have tests here but they don't use the action filter. |
I'm closing this in favour of opening this GH bug |
Clarify in docs that semantic_text fields are not currently supported in object fields