Trying to remove stopwords from ES-index JAVA API

You will need to set the analyzer field in your mappings for the fields you want to use this analyzer. See here for more information on the settings for String fields including the analyzer parameter: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-core-types.html#string

If you want to set all String fields to use that analyzer you should look at dynamic templates: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-root-object-type.html#_dynamic_templates

Hope that helps