-
Hi, I wonder what the vectorSort value is, as it is not elaborated in the official documentation. Moreover, I have a small bug with that(unless this behaviour is intended) I use meilisearch with the hybrid search, using OpenAI text-embedding-3-small. {
"title": "hidden",
"score": 0.65,
"scoreDetails":
{
"vectorSort":
{
"order": 0,
"similarity": 0.6548299789428711
},
"<hidden-rule-1>":
{
"order": 1,
"value": "<hidden>"
},
"<hidden-rule-2>":
{
"order": 2,
"value": "<hidden>"
},
"<hidden-rule-3>":
{
"order": 3,
"value": "<hidden>"
},
"<hidden-rule-4>":
{
"order": 4,
"value": "<hidden>"
}
}
} Is it a bug, or intended feature? If it is not a bug, could you explain this behaviour? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hello, can you elaborate which part of the result you find surprising? The ranking score details contain the list of ranking rules that were applied to produce the result. In hybrid search, results that come from the full text search will have the ranking rules from the index, and results that come from the semantic search will have all relevancy ranking rule replaced by the semantic search ranking rule: |
Beta Was this translation helpful? Give feedback.
Sorry, your answer was a bit off topic to my original question, although it is always interesting how it works under the hood.
I felt like I am wasting your time, so looked around the code and I seems I found the answer to my question:
The main reason for
vectorSort
appearing in some cases, is that meilisearch checks whether the keyword search results were good enough to return. And if they are, no semantic search is made, thus there is novectorSort
in_rankingScoreDetails
Here is the snippet:
it is in the
milli/src/search/hybrid.rs
fileSorry if bothered you and thank you for helping me.