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
.
Oct 18, 2023 (1 month ago)
Matthew
04:51 PMtext_match_info
. Does it exist?Matthew
04:55 PMMatthew
04:56 PM"text_match_info": {
"best_field_score": "1108091338752",
"best_field_weight": 15,
"fields_matched": 1,
"score": "578730123365187705",
"tokens_matched": 1
}
Jason
07:38 PMBut any particular behavior I can help explain?
Oct 19, 2023 (1 month ago)
Matthew
01:32 PMbest_field_weight
and how is it reflected in the score?Matthew
01:42 PMbest_field_score
Matthew
02:47 PMtext_match_info
is the same for each result?Oct 20, 2023 (1 month ago)
Kishore Nallan
04:15 AMbest_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
Indexed 3015 threads (79% resolved)
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.
Sorting Search Results Based on Weights
Pantelis wanted to sort search results by weight. Kishore Nallan suggested using "prioritize_exact_match: false" and "text_match_type: 'max_weight'" to achieve the desired result.
Query on "weighted_score" & Issue with Synonym Highlighting
Stefan asked about "weighted_score" field and reported a possible synonym highlighting issue. Kishore Nallan clarified the use of "weighted_score". The possible synonym issue is still being investigated.
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.
Identifying Best Match Field in Document Search
Jack wanted to display the best match field in a document search. Despite Kishore Nallan's suggestion of looking at field weights, Jack decided to sort highlighted fields by number of matched tokens.