Using multiple analyzer in query

I want to implement Synonym and Stopword Filters in my query. For that I created analayers and both are working fine individual. But I want to use them both how can I?

GET my_index/_search/
{
    "query": {
        "match": {
           "_all": {
             "query": "Good and Bad",
             "analyzer": [
                 "stop_analyzer",
                 "synonym"
             ]
           }
        }
    }
}

The above query throws me an error

I think I cant use an array or an object there as when I use single analyzer like "analyzer": "stop_analyzer" or "analyzer": "synonym" it works great. So my question is how can I use both?

A field can have only one analysis chain. You need to create an analyzer
composed with the two filters. An analyzer is comprised of character
filters (pre-tokenization), a tokenizer, and filters (post-tokenization).

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