I need to override default graphq products search to allow typos, so that queries like that:
{
products(
search: "test"
) {
items {
name
}
}
}
{
products(
search: "tets"
) {
items {
name
}
}
}
return same results, I also need them to work with synonyms
as well
I’m getting the idea I could replace the elastic query with something like that:
{
"query": {
"fuzzy": {
"name": "tets"
}
}
}
-
What classes should I override to accomplish that?
-
How to make it work with synonyms too