#community-help

Returning Fuzzy Match Score with Results

TLDR Udo asked if they could return a fuzzy match score, and Jason suggested using the text_match_info field, but detailed scoring information wasn't exposed. Udo mentioned documentation update is needed for text_match_info.

Powered by Struct AI
12
9mo
Solved
Join the chat
Mar 21, 2023 (9 months ago)
Udo
Photo of md5-0ca37054c6c9042aa04fcfb92cc7d99c
Udo
04:55 PM
Hi again. Is there any way to return a fuzzy match score with results? Something like the levenshtein distance (I think I read somewhere you are using a variation of it) in terms of a value between 0 and 1, etc?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:56 PM
Not the fuzzy match score, but there is a text_match_info field that gets returned with every hit that has more ranking info
04:57
Jason
04:57 PM
We combine several criteria, including typo tolerance into a single score to rank on
Udo
Photo of md5-0ca37054c6c9042aa04fcfb92cc7d99c
Udo
04:57 PM
yes I saw that one but I wasn't sure how to interpret that value
04:57
Udo
04:57 PM
I'm trying to get an idea how good the match is. Long story short I have some other results from another search engine and I'm trying to come up with aggregate results based on relevance
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
04:59 PM
We don’t expose that level of detail… But even if we did expose component scores, it would still be hard to compare these across search engines, because scoring works different
Udo
Photo of md5-0ca37054c6c9042aa04fcfb92cc7d99c
Udo
04:59 PM
oh, I see this is new in the latest version
04:59
Udo
04:59 PM
I only saw text_match before. will take a look what it does show
05:00
Udo
05:00 PM
and yes I know you cannot compare it perfectly, but an approximation is fine for my purposes
05:01
Udo
05:01 PM
by the way text_match_info only shows up in release notes, probably the docs need to be updated
05:01
Udo
05:01 PM
at least the docs search finds only one match
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
09:07 PM
Ah right, will update

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3005 threads (79% resolved)

Join Our Community

Similar Threads

Issues With `text_match` Scoring for Search Queries in Typesense

Colin encountered issues with the `text_match` scoring on Typesense v0.23.1. Jason and Kishore Nallan identified a potential issue with numeric overflow in the text match score and applied an unverified patch. The final resolution is unclear.

8

33
17mo

Discussion on Typesense Raw and Altered Text Match Scores

Weilin requested that Typesense provide both raw and altered 'text match' scores for ranking. Jason asked for a GitHub issue and promised to address it next week. Kishore Nallan then clarified the current implementation already includes the raw score.

3

10
16mo
Solved

Phrase Search Relevancy and Weights Fix

Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.

6

111
8mo
Solved

Discussing 'Text Matches' Feature Improvement in Typesense

Stefan asked if distance in 'text matches' can be determined. Kishore Nallan said no and asked for an issue to be created on Github, which was done by Stefan.

5
27mo
Solved

Adjusting Text Match Score Calculation in TypeSense

Johannes wanted to modify the Text Match Score calculation in TypeSense to improve search results returns. With counsel from Jason and Kishore Nallan, various solutions were proposed, including creating a Github issue, attempting different parameters, and updating Docker to a new version to resolve the matter.

3

48
19mo