#community-help

Incorrect Search Results for "Orange Wireless Charger"

TLDR Rocky has an issue where irrelevant results are returned in searches. Jason suggests adjusting drop_tokens_threshold, but the issue persists.

Powered by Struct AI
May 16, 2023 (4 months ago)
Rocky
Photo of md5-d7f4aa44e3d4866e8b7a38eceb9af762
Rocky
12:09 AM
👋 Hi everyone! I need help. for example, search "orange wireless charger", the result will show items not charger. how to avoid this problem? thanks.
below is one example not exact

[highlight] => Array ( [item_color] => Array ( [matched_tokens] => Array ( [0] => Orange )
[snippet] => <mark>Orange</mark> )
[material] => Array ( [matched_tokens] => Array ( [0] => C )
[snippet] => Cotton <mark>C</mark>hino Twill )
[product] => Array ( [matched_tokens] => Array ( [0] => C )
[snippet] => <mark>C</mark>hino Twill Value Visor )
)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
12:19 AM
The reason this is happening is because when there are no records with all keywords in them, Typesense will drop some keywords and try to find a partial match.

If you want to disable this behavior you want to set drop_tokens_threshold to 0.
May 17, 2023 (4 months ago)
Rocky
Photo of md5-d7f4aa44e3d4866e8b7a38eceb9af762
Rocky
12:36 AM
Hi Jason,
thanks for help! I tried to set drop_tokens_threshold to 0, but the result is same. "orange wireless charger"

[highlight] => Array ( [item_color] => Array ( [matched_tokens] => Array ( [0] => Orange )
[snippet] => <mark>Orange</mark> )
[material] => Array ( [matched_tokens] => Array ( [0] => C )
[snippet] => Cotton <mark>C</mark>hino Twill )
[product] => Array ( [matched_tokens] => Array ( [0] => C )
[snippet] => <mark>C</mark>hino Twill Value Visor )
)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:18 AM
Could you give me a set of curl commands like this that replicates the issue?