Does Redisearch have any way to boost when a phrase in the query matches, even when it's not an exact phrase query, e.g. if the search is sushi bar
, the sushi bar review
should outscore sushi is best, bar none
, while both still match. I'm wondering if such a boost is default behaviour or if not, is there some way to set it up in the query?
And if so, would it require NOOFFSETS
off (since I assume it would rely on offsets data)?
Similar question for ElasticSearch. Seems like one answer there is should
instead of must
, but I don't think that's a thing in Redisearch. Im also wondering if Redisearch assemblies could handle it, but not sure the syntax is there to boost in that way.
You could do something like (sushi bar) => {$weight: 10} ~("sushi bar") => {$weight: 20}
. The explanation is that sushi bar
as an intersection (AND
) query; whereas the exact phrase "sushi bar"
is an optional (~
) booster query.