Resolving Short Word Precedence Issue in Typesense Search
TLDR Jake experienced partial short word matches in a typesense search taking precedence over exact matches. Kishore Nallan recommended adjusting the query order, using 'exhaustive_search', and setting 'max_candidates' to optimize results.
1
Jul 13, 2023 (2 months ago)
Jake
08:08 AMe.g.
typesense is set to search over 3 fields; query_by: productCode, productTitle, productDescription
no other additionalSearchParamters are set.
Searching for: pen will always find partial results in the productCode field before exact results in productTitle or productDescription
What is even worse is that results increase if productCode is removed, with productCode it returns 12 results, without it returns 1686
Kishore Nallan
08:12 AMpen
?Jake
08:15 AMJake
08:16 AMKishore Nallan
08:18 AMproductCode
ahead in the query_by list you are influencing its weight in ranking. Try placing it last.Jake
08:18 AMJake
08:20 AMKishore Nallan
08:23 AMpen2567
which won't exist in other fields.You can set
max_candidates: 100
to make the engine look for more candidates.Jake
08:28 AMJake
08:29 AMKishore Nallan
08:30 AMJake
08:32 AM1
Jake
08:35 AMKishore Nallan
08:39 AMTypesense
Indexed 2786 threads (79% resolved)
Similar Threads
Understanding Search Result Variations with Filtering Parameters
SamHendley faced inconsistencies in the number of documents returned when adding more filter parameters. Jason explained it's due to Typesense limiting the number of variables checked for better performance. Increasing `max_candidates` or enabling `exhaustive_search` can help obtain all values.
Resolving Typesense Search Issues
Conversation started by Maximilian about Typesense search behavior led to Users Kishore Nallan and Mike discussing and suggesting workaround, with Kishore Nallan promising an official solution soon. No final confirmation of resolution provided.
Adjusting Text Match Score Calculation in TypeSense
Johannes wanted to modify the Text Match Score calculation in TypeSense to improve search results returns. With counsel from Jason and Kishore Nallan, various solutions were proposed, including creating a Github issue, attempting different parameters, and updating Docker to a new version to resolve the matter.
Inconsistent Results from Filter_by Function in Typesense
Md.Riad was getting varying product results using Typesense's filter_by function. John suggested it might be a typo-correction issue while Kishore Nallan advised increasing the max_candidates parameter.
Search Query Issues in Typesense
Gines wanted search results in Typesense for partial matches, not just exact ones. Kishore Nallan suggested solutions, but none fulfilled Gines's requirements.