Using multiple analyzer in query

(Priyank) #1

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": [

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?

(Ivan Brusic) #2

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).

(system) #3

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