Query Parameter Not Matching Full Names
TLDR Oliver experienced issues with query parameters not matching full names. Jason suggested adjusting the drop_tokens_threshold
and max_candidates
settings, while linking to a feature request to track demand.
Mar 09, 2023 (7 months ago)
Oliver
04:19 PMI have a query parameter as
Chris Schmidt
, and I’m querying by first name, last name. However I’m getting results matched just by Chris, and no matches by the lastName, so for example I would get Chris Rogers, Chris Williams etc above Christopher Schmidt, I believe this is because it’s taking it as a whole sentence instead of per word, so my question isHow could I get matches both by
Chris
and Schmidt
🙌:skin-tone-2:Jason
04:42 PMChris Schmidt
and when it doesn’t find a full exact match, it then tries to drop words from the query (configured by drop_tokens_threshold
) and searches just Chris
and Schmidt
.If you’ve configured first_name to have higher priority (based on order of fields in
query_by
) it then finds an exact match for Chris
and prioritizes those records first in the results.Jason
04:42 PMJason
04:43 PMMar 10, 2023 (7 months ago)
Oliver
03:58 PMweights
the same & set prioritize exact match
to false, it would not take into account Schmidt
& return the results for Chris
. Do you think there’s a workaround to also take into account the second word when dropping words?Thanks added this to the Feature request, it would be awesome 🙌:skin-tone-2:
Mar 11, 2023 (7 months ago)
Jason
12:12 AMdrop_tokens_treshold: 1000
and set max_candidates: 1000
to see if that helps?Typesense
Indexed 2779 threads (79% resolved)
Similar Threads
Issue with Typo Correction/Prefix Search and the Role of max_candidates
John noticed inconsistent search results based on max_candidates settings, and Kishore Nallan clarified its role for multi-word queries. They resolved that increasing max_candidates ensures the query isn't prematurely limited.
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.
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.