Hello team,
Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
2.13.0
Describe the issue:
I’m making a query using a compound query with two sub queries and I’m trying to get the individual score for each sub query. Currently, I only have the score for both queries combined (sum).
My query:
{
"_source": {
"excludes": [
"object_embedding",
"title_embedding"
]
},
"query" : {
"bool": {
"must": [
{
"neural": {
"title_embedding": {
"query_text": "As an OlderPerson, I want to know exactly what ALFRED does with my personal data, and share it only on my specific permission.",
"model_id": "qsUuMI8BL6WYG43s_Q1l",
"k": 5
}
}
},
{
"neural": {
"object_embedding": {
"query_text": "b",
"model_id": "qsUuMI8BL6WYG43s_Q1l",
"k": 5
}
}
}
]
}
}
}
And the result is:
{
....
"max_score": 1.484573,
"hits": [
{
"_index": "requirements-object-nlp",
"_id": "REQ-JFNBWG",
"_score": 1.484573,
"_source": {
"id": "REQ-JFNBWG",
"title": "As an OlderPerson, I want to know exactly what ALFRED does with my personal data, and share it only on my specific permission.",
"object": "BR"
}
}
]
}
}
Observe that in the result contains a _score: 1.484573
. For the first query, the score is 1 and for the second is 0.484573
, so combined, we have that final result, which makes sense. But I also would like to “split” the score in the result, I would like the score for individual queries, for instance:
"_score": 1.484573,
"query0": 1,
"query1": 0.484573
Is it possible? If so, how can I achieve it?
Thank you. I really appreciate your time.