Hey, I'm trying to tune a query for better results...
# community-help
e
Hey, I'm trying to tune a query for better results, but nothing seems to get the right result surfaced, it stays stubbornly stuck in 8th place. Seems like something in the scoring is causing the best match (canonical_title of "Attack on Titan") to have a lower text_match (maybe due to fields_matched being lower? I don't see that documented as a factor). I've tried bucketing (with 6 buckets, but there's only 27 results on this specific query, which counterintuitively means removing a word improves the results) as well as switching to other
text_match_type
options like
max_weight
and even changing
query_by_weights
but nothing seems to get it right 😞 The following is my query and results: https://gist.github.com/NuckChorris/2013cfc9258c76f0dbf2b3c6ba69bc63 Perhaps notably it seems like
"best_field_weight"
is
15
on everything, whereas I would expect it to be
100
on records matching on my 100-weighted field (canonical_title)
Figured it out, it's
prioritize_num_matching_fields
— not mentioned on that page, but mentioned on the search params page: https://typesense.org/docs/27.1/api/search.html#ranking-and-sorting-parameters I'd recommend that be listed on the ranking guide, idk about other applications but this one is huge for me 😄