Hello, I am having an issue with multi-way synonym...
# community-help
m
Hello, I am having an issue with multi-way synonyms in Typesense. Here is the situation: • I defined the following synonym group ["urad", "udad", "black lentil"] • When I search for "urad", I get correct matches like "black lentil" but also irrelevant results like "black grapes" • I believe this happens because "black lentil" is tokenized into ["black", "lentil"], so the token "black" matches unrelated items like "black grapes" • I want searching for "urad" to return only relevant results such as "black lentil" and "urad whole" • It should not return unrelated results containing just the word "black" like "black grapes" • Searching for "black lentil" should return results related to "urad" (reverse synonym matching) • What I have tried so far: ◦ Using multi-way synonyms as above ◦ Replacing "black lentil" with "black_lentil" in synonyms to avoid tokenization issues. But after doing this: ▪︎ Searching for "urad" returns "urad whole" but not "black lentil" ▪︎ Searching for "black lentil" does not return "urad" How do I overcome this issue and achieve accurate synonym-based matching without irrelevant results? Please guide me. Thanks!