Stop words not working for elastic enterprise search

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

      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.

hey @CTO_Servefast !

Stop words are predefined 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.

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

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 off of the Elasticsearch index you created.

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