Hi all - really enjoying typesense so far! Occasio...
# community-help
e
Hi all - really enjoying typesense so far! Occasionally running into an issue with relevancy ordering. It seems that when
prioritize_exact_match
is set to true, it weights exact matches very heavily in the scoring. As a simplified example, if we have records with two fields - title and tags - the desired behavior would be to have exact matches for title show up first, then inexact matches for title, then exact matches for tags, etc. However because
prioritize_exact_match
is weighted so much heavier compared to the
query_by_weights
, we can’t achieve this even if the title is weighed at 127 and the tag is weighted at 1. Any ideas on ways to work around this? As an aside it would be great if
prioritize_exact_match
was a numerical value so there could be more flexibility!
j
Could you try setting
prioritize_exact_match
to false?
👍 1
Could you also try this on
0.24.0.rcn22
, we tweaked some related behavior in 0.24.x
e
yep our current plan is to set it to false, just curious if there were any other solutions since ideally we would give slight preference to exact matches. But sounds like setting to false is probably the way to go.
and we are on typesense cloud but will try to find some time to try that version out locally!
j
Typesense should give priority to exact matches in a particular field by default, based on weight. We added
prioritize_exact_match
to override this behavior across fields, so regardless of weight, if an exact match occurs it will be prioritized when this flag is true
e
ah ok that makes sense, thank you!