#community-help

Improving Search Query to Match Multiple Words

TLDR Tim wanted to adjust search for multiple-word values. Jason suggested using double-quotes or adjusting search settings.

Powered by Struct AI
5
9mo
Solved
Join the chat
Mar 01, 2023 (9 months ago)
Tim
Photo of md5-96b600ac63a91c0a63ecfe2fa00e8233
Tim
06:23 PM
I am trying to do a search but want the search to consider two words in the search not just 1. So for instance if I have a dataset that has the names { “name”: “Site 1", “name”: “Site 2", “name”: “Site 3", “name”: “Site 4"} and I search search by names for “Site 12” I want it to not return anything because there is no “Site 12" in the dataset. Right now it is returning them all because “Site” is found in all of the names. Is there any way to adjust the search to find values that basically and words separated by spaces?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
08:20 PM
You can surround the search term with double-quotes to ensure a strict match
08:20
Jason
08:20 PM
Eg: "Site 12"
Tim
Photo of md5-96b600ac63a91c0a63ecfe2fa00e8233
Tim
08:21 PM
Is that the only way?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
08:39 PM
You could try setting drop_tokens_threshold: 0, typo_tokens_threshold: 0, prefix: false