#community-help

Improving Synonym Ranking in Search Results

TLDR John wanted a better ranking method for synonyms in searches. Jason suggested creating a GitHub issue to add a new ranking option.

Powered by Struct AI
Jul 18, 2022 (17 months ago)
John
Photo of md5-21545f1facb7836c149bc4c70752bd2b
John
04:02 PM
Is there any way to define synonyms so that exact matches are still weighed a bit higher? E.g. with a one-way synonym from “foo” to “bar”, I’d want a query for “foo” to contain all the “bar”s, but the ones that actually contain “foo” should be ranked first.
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:07 PM
We currently force synonym matches to have the same text match score as the root matches, so they are ranked the same. So if there’s a popularity score specified in sort_by that is used for tie-breaking.

But the use case you describe makes sense. I’m thinking we should have an option to configure ranking so that synonym matches are ranked at least 1 unit lower than the root match. Could you open a Github issue for this?