# Stop words not working for elastic enterprise search

**URL:** <https://discuss.elastic.co/t/stop-words-not-working-for-elastic-enterprise-search/361129>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [June 10, 2024, 9:02am UTC](https://discuss.elastic.co/t/stop-words-not-working-for-elastic-enterprise-search/361129 "2024-06-10T09:02:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CTO\_Servefast](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cto_servefast/32/131802_2.png) [@CTO\_Servefast](https://discuss.elastic.co/u/CTO_Servefast)\
**Post date:** [June 10, 2024, 9:02am UTC](https://discuss.elastic.co/t/stop-words-not-working-for-elastic-enterprise-search/361129/1 "2024-06-10T09:02:20Z")

</div>

I am trying to add stop words in my elastic enterprise search but i can not find any documentation for it.

```auto
      const searchRequest: SearchRequest = {
        engine_name: engineName,
        body: {
          query: requestData.query,

          page: {
            current: requestData.current,
            size: requestData.size,
          },
          search_fields: {
            html_content: { weight: 10 },
            title: { weight: 0 },
            provider: { weight: 0 },
            user_id: { weight: 0 },
            file_id: { weight: 0 },
          },

          // Better documentation for filters
          // https://swiftype.com/documentation/app-search/api/search/filters#combining-filters
          filters: {
            user_id: token.uid,
          },
        },
      };
      const searchResponse = await client.app.search(searchRequest);

```

Example of my request.

---

<div class="post-metadata">

**Author:** ![Carlos\_D](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_d/32/126245_2.png) [@Carlos\_D](https://discuss.elastic.co/u/Carlos_D)\
**Post date:** [June 10, 2024, 10:50am UTC](https://discuss.elastic.co/t/stop-words-not-working-for-elastic-enterprise-search/361129/2 "2024-06-10T10:50:30Z")

</div>

hey @CTO_Servefast !

Stop words are [predefined](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-stop-tokenfilter.html#analysis-stop-tokenfilter-stop-words-by-lang) for the language that you have set for your engine.

If you want to define your own stopwords for an App Search Engine, you could use an Elasticsearch based engine and [configure your own mappings and analyzers](https://www.elastic.co/guide/en/app-search/current/elasticsearch-engines-mappings-and-analyzers.html).

---

<div class="post-metadata">

**Author:** ![CTO\_Servefast](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cto_servefast/32/131802_2.png) [@CTO\_Servefast](https://discuss.elastic.co/u/CTO_Servefast)\
**Post date:** [June 10, 2024, 8:15pm UTC](https://discuss.elastic.co/t/stop-words-not-working-for-elastic-enterprise-search/361129/3 "2024-06-10T20:15:44Z")

</div>

Hi could you give me an example of how to do it with Elasticsearch based engine i dont really understand the difference between Elasticsearch and elastic enterprise search

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [June 10, 2024, 8:43pm UTC](https://discuss.elastic.co/t/stop-words-not-working-for-elastic-enterprise-search/361129/4 "2024-06-10T20:43:45Z")

</div>

Hi there @CTO_Servefast - App Search Engines are easy to create and quickly return quality text search results, but the trade off to using App Search is that it's very opinionated and doesn't have the same amount of flexibility that regular Elasticsearch offers.

If you're using App Search and need to customize stop words, you need to do a little work to get this working in App Search. As @Carlos_D said, you'll need to create an index with predefined mappings and analyzers. Once you have that set up to your liking, you can create an [Elasticsearch backed engine](https://www.elastic.co/guide/en/app-search/current/elasticsearch-engines.html) off of the Elasticsearch index you created.

---

<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:** [July 8, 2024, 8:44pm UTC](https://discuss.elastic.co/t/stop-words-not-working-for-elastic-enterprise-search/361129/5 "2024-07-08T20:44:42Z")

</div>

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