Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.19.3
Describe the issue: Opensearch K-NN semantic search issue
Configuration: We are enabling K-NN plugin for sematic search with model and followed the steps given at URL- Pretrained models - OpenSearch Documentation
Model details-
"name": "huggingface/sentence-transformers/msmarco-distilbert-base-tas-b"
"version": "1.0.2"
Indexed data in JSON format
{
"type": "ITEM",
"containerName": "Employee",
"identifier": "1091",
"primaryKey": "1091",
"displayName": "Dhiraj",
"attributes": {
"Employee Specification": {
"Marital Status": "Married",
"Unit": "Engineering",
"Date Of Birth": "12-05-1997 00:00:00"
}
}
}
Ingest Pipeline defined like below:
{
"description": "An NLP ingest pipeline with nested mapping",
"processors": [
{
"text_embedding": {
"model_id": "LcSefJoBrBYz4hPBfVXG",
"field_map": {
"attributes": {
"Employee Specification": {
"Unit": "unit_embedding",
"Date Of Birth": "edob_item_embedding"
},
"Customer Catalog Primary Spec": {
"Date Of Birth": "cdob_item_embedding"
}
}
}
}
}
]
}
We are try to search with below query-
GET /my-nested-nlp-index1/_search
{
"_source": {
"excludes": [
"unit_embedding",
"edob_item_embedding",
"cdob_item_embedding"
]
},
"query": {
"neural": {
"edob_item_embedding": {
"query_text": "employees having birth year 1997",
"model_id": "LcSefJoBrBYz4hPBfVXG",
"k": 5
}
}
}
}
Relevant Logs or Screenshots: Sematic search response does not have anything relevant data or 0 hits
{
"took": 63,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 0,
"relation": "eq"
},
"max_score": null,
"hits": []
}
}