Closed acodeninja closed 2 years ago
example: https://github.com/LBHackney-IT/lbh-social-care-next-gen-search/blob/main/pages/api/search.ts#L114
we want to expose this as a number in the _meta
key of the result, like:
{
_meta: {
score: 0.5
// etc...
}
// etc...
}
This is actually already implemented...
{
results: [
{
score: 0.5198604,
data: {
mosaicId: 39201,
title: "Mr",
firstName: "Able",
lastName: "Thornton",
_meta: {
location: {
frontend: "https://website/resident/39201",
api: "https://api/resident/39201"
},
domain: "resident",
compound: "39201 Mr Able Thornton"
}
}
}
],
count: 1
}
What does it do now?
Does not return the results ranking for the terms entered.
What should it do?
Return the ranking of each result.