Resolving Odd Search Results and Using Curation Feature

TLDR Gerald experienced odd search results, and Jason suggested setting `drop_tokens_threshold` and using the curation feature to filter out certain results.

Photo of Gerald
Gerald
Tue, 20 Jun 2023 13:41:56 UTC

I have a circumstance where results appear to rank oddly. Let’s say I’m searching by 4 fields: primary category (furniture, etc), secondary (type), material, title. If I search for “metal chair” the result pulls up entries with the word “metal” in the title. Even though the primary and secondary category are weighted higher than title.

Photo of Jason
Jason
Tue, 20 Jun 2023 16:16:33 UTC

I suspect this is `drop_tokens_threshold` kicking in. Could you try setting `drop_tokens_threshold: 1000`?

Photo of Gerald
Gerald
Tue, 20 Jun 2023 19:16:00 UTC

Thanks for that, I used the option which designates a deep search and it improved. I’ll compare when I’m out of the garden

Photo of Gerald
Gerald
Wed, 21 Jun 2023 03:23:00 UTC

These options helped (in different ways). We are still adapting how our data is being seen by typesense. Is there a solution out there in userland where you can build a list of terms which would automatically filter out certain results?

Photo of Jason
Jason
Wed, 21 Jun 2023 06:07:19 UTC

Yup, you want to look at the curation feature:

Photo of Gerald
Gerald
Thu, 22 Jun 2023 05:53:31 UTC

There’s a lot of control there! Can search query use multiple words per rule, such as “chair or sofa” would filter out content which is not categorized as “seating”

Photo of Jason
Jason
Thu, 22 Jun 2023 13:58:44 UTC

It supports multiple words, but as literal strings, not as boolean operators

Photo of Jason
Jason
Thu, 22 Jun 2023 13:59:06 UTC

For your example, you want to create multiple rules