DEV Community

loading...

Discussion on: Did you mean: Elasticsearch suggestions?

Collapse
buinauskas profile image
Evaldas

Every single time I used this, I kinda regretted. It was hard to configure for bigger datasets and I often was getting funny suggestions.

For instance beer would be suggested as bear 😂

Collapse
raoulmeyer profile image
Raoul Meyer Author

Yeah agreed, it can give interesting suggestions. That's why I would mostly use it in cases where any alternative is better than showing no results.

Out of curiosity, what was your use case? Did you try limiting your suggestions with a collate query?

Collapse
buinauskas profile image
Evaldas • Edited

It was classic search. Search data consisted of categories, countries, companies, brands, other attributes. Millions of possible combinations of these.

I did use collate query but it was very likely that suggestion with bear also would have brought back results. But there's a chance I did something wrong. 🤔

Collapse
larrycinnabar profile image
Larry Cinnabar • Edited

To solve the problem in this example ("bear" vs "beer") - we need to provide user's query history alongside the current request. So search can determine if user hunts often, or uses Bear framework, or cooks wheat beer

Thread Thread
buinauskas profile image
Evaldas

That's a very good suggestion. Thank you.