#community-help

Query Weighting Issue with 'Prioritize_Exact_Match'

TLDR John is facing issues with search results prioritizing lower query weights. Kishore Nallan explained it as a limitation in text match scoring, but agreed on the need for better scoring configuration.

Powered by Struct AI
Nov 09, 2022 (11 months ago)
John
Photo of md5-21545f1facb7836c149bc4c70752bd2b
John
01:30 PM
I have a case where I’m searching for e.g. “blue case” and I’m getting results for an “exact match” on a field with a low query weight first, instead of a match on the color and the title fields which have much higher query weights. I think this is because of some prioritize_exact_match behaviour, but even when I set that to false it still comes first. Any ideas?
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
01:37 PM
If you have a record where blue and case exist on different fields, that is considered lower text match score than a single field containing both words blue case -- the weights come into picture only when text relevancy score is the same.
John
Photo of md5-21545f1facb7836c149bc4c70752bd2b
John
01:54 PM
And there’s no way to configure this? feels like it’d make sense to have this as a flag, and based on this comment https://typesense-community.slack.com/archives/C01P749MET0/p1666973627777529?thread_ts=1666961897.200119&cid=C01P749MET0 I thought that’s what prioritize_exact_match would already do
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
02:01 PM
There's no way to configure this but yes, we should probably have a way to treat word matches across fields to have same score as words matching in a single field.