How does one order the results of a anyofterms
based query?
The expectation is that the most relevant matches would be at the top of the result set, but this is not the case.
Example: Try the following on https://docs.dgraph.io/query-language/#term-matching
{
me(func: anyofterms([email protected], "Judith Jones"), first: 10) {
[email protected]
}
}
This gives the following result set:
{
"data": {
"me": [
{
"[email protected]": "Una Brandon-Jones"
},
{
"[email protected]": "Sasha Frere-Jones"
},
{
"[email protected]": "Judith Jones"
},
{
"[email protected]": "Damon Jones"
},
{
"[email protected]": "Cheyenne Jones"
},
{
"[email protected]": "Emily Jones"
},
{
"[email protected]": "Sarah Jones"
},
{
"[email protected]": "Chester Jones III"
},
{
"[email protected]": "Ike Jones"
},
{
"[email protected]": "Richard T. Jones"
}
]
}
}
Clearly “Judith Jones” is the best match and should be at the top.
Is there a way to get access to the score from the underlying bleve
engine? That way we would be able to order the results.