Issue With Expanded 'query_by' Fields in Typesense search
TLDR Emma experienced fewer search results with more 'query_by' fields in Typesense. Kishore Nallan explained that matching can vary with more fields, but didn't offer a solution.
Sep 21, 2023 (2 months ago)
Emma
06:57 AMquery_by
would… give fewer results? When I search for fate zero
in my index with query_by=canonical_title
I get the expected result (the anime where canonical_title: "Fate/zero"
) but if I do query_by=canonical_title,titles.*,alternative_titles,descriptions.*&query_by_weights=100,90,90,80
then I stop getting that result and instead get a weird match (an anime where canonical_title: "Gravitation"
)This is the match info for
query_by=canonical_title,titles.*………………
(incorrect result): "text_match_info": {
"best_field_score": "1112386306048",
"best_field_weight": 13,
"fields_matched": 1,
"score": "1155199671761633385",
"tokens_matched": 2
}
vs for the
query_by=canonical_title
(correct result): "text_match_info": {
"best_field_score": "1108091339008",
"best_field_weight": 15,
"fields_matched": 1,
"score": "578730123365711993",
"tokens_matched": 1
}
My initial theory is the
/
is throwing it off, but I’m not sure, I would assume /
is considered a word separatorKishore Nallan
10:02 AMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
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.
Issue with Query Expectations on Typesense Search
Sean was having an issue with their search query on Typesense. Kishore Nallan suggested adjusting the 'drop_tokens_threshold' parameter. After making the adjustment, Sean found an issue with the order of the results, which was resolved by updating Typesense version.
Understanding Typesense Query Fuzziness and Thresholds
Ashraful was confused about different query results when applying filters in Typesense. Jason clarified the function of `drop_tokens_threshold` and `typo_tokens_threshold` options, explaining their effect on search results and their precedence.