#community-help

Clarifying Fields Inside `text_match_info`

TLDR Matthew asks for clarification on text_match_info fields. Jason explains no documentation exists but offers help. This leads to Kishore Nallan explaining specifics about best_field_weight and best_field_score.

Powered by Struct AI
Oct 18, 2023 (1 month ago)
Matthew
Photo of md5-ac3436827bebcd62308d83f3823df584
Matthew
04:51 PM
I'm having trouble finding any documentation defining the fields inside text_match_info. Does it exist?
04:55
Matthew
04:55 PM
It would be nice to have detail on how to interpret each field.
04:56
Matthew
04:56 PM
"text_match_info": {
    "best_field_score": "1108091338752",
    "best_field_weight": 15,
    "fields_matched": 1,
    "score": "578730123365187705",
    "tokens_matched": 1
}
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
07:38 PM
We haven't documented this yet...

But any particular behavior I can help explain?
Oct 19, 2023 (1 month ago)
Matthew
Photo of md5-ac3436827bebcd62308d83f3823df584
Matthew
01:32 PM
What is best_field_weight and how is it reflected in the score?
01:42
Matthew
01:42 PM
Also best_field_score
02:47
Matthew
02:47 PM
It also appears that the text_match_info is the same for each result?
Oct 20, 2023 (1 month ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
04:15 AM
best_field_weight is the weight of the field with the best matching text when scored against the query tokens. If a user provided set of field weights are not given, the fields in the query are assigned descending order of weights. best_field_score is the actual score of the best matching field.

We use these values to compute an aggregated text match score per record.

> It also appears that the text_match_info is the same for each result?
This can happen if all records being returned exactly contain all the query tokens.

Typesense

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

Indexed 3015 threads (79% resolved)

Join Our Community