Basically I'm building is a search box with completion suggestion. I'm using my product title field for suggestions.
So once the user types in the field, suggestions has to be there and after clicking the search button the results will be loaded.
To do the completion suggestions I have used this properties in my title.
title: {
type: "completion",
analyzer: "simple",
search_analyzer: "simple"
}
In search I want to use a fuzziness query. But the analyzed fields don't support fuzzy queries. My seach query looks like this.
{
"size": 40,
"query": {
"bool": {
"must": [
{
"multi_match": {
"fields": [ "title^2", "discrip"],
"query": "plnt sales",
"fuzziness": "AUTO"
}
}],
"filter": {
"bool": {
"must":[
{"term" : {"delivery_status" : 0}}
]
}
}
}
}
}
I'm a newbie to Elasticsearch, What is the solution for this. Or is there any other way I can achieve this.
Thank you!