here my index mapping:
{
"chunker2": {
"aliases": {},
"mappings": {
"properties": {
"creation_time": {
"type": "date"
},
"full_text": {
"type": "text"
},
"paragraph": {
"type": "nested",
"properties": {
"paragraph_id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"text": {
"type": "text",
"index": false
},
"vector": {
"type": "dense_vector",
"dims": 2,
"index": true,
"similarity": "cosine"
}
}
}
}
},
"settings": {
"index": {
"routing": {
"allocation": {
"include": {
"_tier_preference": "data_content"
}
}
},
"number_of_shards": "1",
"provided_name": "chunker2",
"creation_date": "1706287328649",
"number_of_replicas": "1",
"uuid": "yStzE38xTx2EgZnGswDslg",
"version": {
"created": "8500003"
}
}
}
}
}
I need to perform a KNN on it but receiving back multiple inner_hit.
So if have 2 document with 2 vector inside both (total of 4 vector)
i want to receive back 4 vector similar to this:
POST chunker2/_search
{
"fields": [
"creation_time",
"full_text"
],
"_source": false,
"knn": {
"query_vector": [
0.45,
45
],
"field": "paragraph.vector",
"k": 4,
"num_candidates": 6,
"inner_hits": {
**A WAY HERE TO RETURN MULTIPLE HIT?**
"fields": [
"paragraph.text"
]
}
}
}
is it possible to retrive for each sub/nested field the KNN score?