#community-help

Clarification on "prioritize_exact_match" Parameter

TLDR Jeremie queried about the "prioritize_exact_match" parameter in Typesense. Kishore Nallan suspected the duplicate words in the query were the problem, and this was confirmed by Jeremie. A Github issue was created for tracking.

Powered by Struct AI

1

yw

1

6
1mo
Solved
Join the chat
Oct 24, 2023 (1 month ago)
Jeremie
Photo of md5-d26421770508c44c8a86b79749c80dd5
Jeremie
10:07 AM
Hi there ! It seems I may have a wrong understanding of the “prioritize_exact_match” parameter. I have two documents with a field “title” respectively with “as far as the eye” and “as far as the eye bundle”. When searching for the string “as far as the eye”, the first hit is actually the LATEST document indexed, even if there’s one that clearly has an exact_match with the field value being exactly the string passed as query.
The documentation says clearly that it depends on a “particular field value verbatim”, but from my tests it seems any document that matches all the searched tokens is considered an exact match, right ? Did I misunderstood something here or the only way to make this work is having a “title_length” field on the side and tie-order on this field ?
> By default, if the search query matches a particular field value verbatim, Typesense deems that document to have the highest relevancy and prioritizes it.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
04:06 PM
I suspect the duplicate as in the query to be the issue here. Can you verify that? Can you also please create an issue on Github for us to track?
Oct 25, 2023 (1 month ago)
Jeremie
Photo of md5-d26421770508c44c8a86b79749c80dd5
Jeremie
08:56 AM
Spot on ! It works as expected with titles / query with no duplicates
08:56
Jeremie
08:56 AM
I’m creating a github issue.

1

09:04
09:05
Jeremie
09:05 AM
Thanks Kishore Nallan !
yw

1