Using stop-words in autocomplete search

Hi all. On our project, we use elastic to search for products through the autocomplete function using something like this query

GET food/_search
{
  "suggest": {
    "autocomplete": {
      "prefix": "apple",
      "completion": {
        "field": "suggest",
        "fuzzy": {
          "fuzziness": 0
        }
      }
    }
  }
}

By this mapping:

```
PUT /food
{
  "mappings": {
    "properties": {
      "suggest": {
          "type": "completion"
        }
     }
  }
}

We're having trouble adding stop words and excluding plurals from the search query. We tried to connect an analyzer with a stopword filter, but it did not work in our case. Please tell me if this is possible and in what direction we need to move

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.