Hey Guys!
I'll need some help - we are trying to build a search system. And we have a few business rules.
Right now, our search template is looking like this:
GET web-shop-0/_search
{
"query": {
"bool": {
"should": [
{
"wildcard": {
"name": {
"value": "{{query}}*",
}
}
},
{
"fuzzy": {
"name": {
"value": "{{query}}",
"fuzziness": 2,
}
}
}
]
}
}
}
The problem is:
- When searching by "submarine" it returns fine...
- However, when we do by "submarin" it returns something like:
- "mini submarine"
- "maxi submarine"
- "submarine"
Our goal is to result always first the submarine, so it should be always the first word...
Not sure if I was very clear, but please let me know.
Tnx!