#community-help

Understanding the 'text_match' calculation in Typesense.

TLDR John asked about the interpretation of text_match scores while Kishore Nallan clarified that the score is a composed int64 integer and shared the computation link.

Powered by Struct AI

1

2
18mo
Solved
Join the chat
Jun 20, 2022 (18 months ago)
John
Photo of md5-21545f1facb7836c149bc4c70752bd2b
John
12:38 PM
Is there any explanation of how text_match is computed somewhere, or some way to make it more interpretable? I get scores like 565161851289602 which is quite opaque 😅
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
12:42 PM
The score is a single int64 integer that's composed from several byte-wise text relevancy "components". The major bit is calculated here: https://github.com/typesense/typesense/blob/main/include/match_score.h#L53

1