# Using stop-words in autocomplete search

**URL:** <https://discuss.elastic.co/t/using-stop-words-in-autocomplete-search/328840>\
**Category:** Elasticsearch\
**Created:** [March 29, 2023, 2:08pm UTC](https://discuss.elastic.co/t/using-stop-words-in-autocomplete-search/328840 "2023-03-29T14:08:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kolobok99](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kolobok99/32/119143_2.png) [@Kolobok99](https://discuss.elastic.co/u/Kolobok99)\
**Post date:** [March 29, 2023, 2:08pm UTC](https://discuss.elastic.co/t/using-stop-words-in-autocomplete-search/328840/1 "2023-03-29T14:08:17Z")

</div>

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

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

```

By this mapping:

````auto
```
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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 26, 2023, 2:08pm UTC](https://discuss.elastic.co/t/using-stop-words-in-autocomplete-search/328840/2 "2023-04-26T14:08:56Z")

</div>

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