I have issued a query like below:
{
"query": {
"bool": {
"should": [
{
"text_embedding": {
"path_embedding.tokens": {
"model_id": "intfloat__multilingual-e5-base",
"model_text": "What is the purpose of the EHS Location Hierarchy?"
}
}
},
{
"text_embedding": {
"passage_embeddding.tokens": {
"model_id": "intfloat__multilingual-e5-base",
"model_text": "What is the purpose of the EHS Location Hierarchy?"
}
}
}
]
}
}
}
and it gets rejected with this error:
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "unknown query [text_embedding]",
"line": 6,
"col": 39
}
],
"type": "x_content_parse_exception",
"reason": "[6:39] [bool] failed to parse field [should]",
"caused_by": {
"type": "parsing_exception",
"reason": "unknown query [text_embedding]",
"line": 6,
"col": 39,
"caused_by": {
"type": "named_object_not_found_exception",
"reason": "[6:39] unknown field [text_embedding]"
}
}
},
"status": 400
}
However, viewing the documents, they have both the passage_embedding tokens array and path_embedding tokens array. The model shows text_embedding as a type:
and the pipeline processors have generated these tokens using:
{
"processors": [
{
"inference": {
"model_id": "intfloat__multilingual-e5-base",
"target_field": "passage_embedding",
"field_map": {
"passage": "text_field"
},
"inference_config": {
"text_embedding": {
"results_field": "tokens"
}
}
}
},
{
"inference": {
"model_id": "intfloat__multilingual-e5-base",
"target_field": "path_embedding",
"field_map": {
"path": "text_field"
},
"inference_config": {
"text_embedding": {
"results_field": "tokens"
}
}
}
}
]
}
Why would the query be rejected?
I was following the example here.
Note: if I use the incorrect text_expansion the error returns claiming the model is configured for text_embedding:
{
"error": {
"root_cause": [
{
"type": "status_exception",
"reason": "Trained model [intfloat__multilingual-e5-base] is configured for task [text_embedding] but called with task [text_expansion]"
}
],
"type": "status_exception",
"reason": "Trained model [intfloat__multilingual-e5-base] is configured for task [text_embedding] but called with task [text_expansion]",
"caused_by": {
"type": "status_exception",
"reason": "Trained model [intfloat__multilingual-e5-base] is configured for task [text_embedding] but called with task [text_expansion]"
}
},
"status": 403
}