# Unable to apply multiple analyzer

**URL:** <https://discuss.elastic.co/t/unable-to-apply-multiple-analyzer/99293>\
**Category:** Elasticsearch\
**Created:** [September 4, 2017, 12:47pm UTC](https://discuss.elastic.co/t/unable-to-apply-multiple-analyzer/99293 "2017-09-04T12:47:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kanchan](https://avatars.discourse-cdn.com/v4/letter/k/8797f3/32.png) [@kanchan](https://discuss.elastic.co/u/kanchan)\
**Post date:** [September 4, 2017, 12:47pm UTC](https://discuss.elastic.co/t/unable-to-apply-multiple-analyzer/99293/1 "2017-09-04T12:47:41Z")

</div>

Hi,

I have created custom analyzer like this:  
PUT /historical\_new\_one/\_settings  
{  
"settings": {  
"analysis": {  
"filter": {  
"StopFilterFactory": {  
"type": "stop",  
"stopwords": "_english_",  
"ignoreCase": true  
},  
"ASCIIFoldingFilterFactory": {  
"type": "asciifolding",  
"preserve\_original" : false  
},  
"EdgeNGramFilterFactory": {  
"type": "edge\_ngram",  
"min\_gram": 1,  
"max\_gram": 250  
},  
"LowerCaseFilterFactory": {  
"type": "lowercase"  
},  
"TrimFilterFactory": {  
"type": "trim"  
},  
"SynonymFilterFactory": {  
"type": "synonym",  
"synonyms\_path" : "/opt/elasticsearch-5.3.0/config/synonyms.txt",  
"ignoreCase": true,  
"expand": true  
}  
},

```
     "analyzer": {
        "text_general_best": {
           "tokenizer": "keyword",
           "filter": [
              "StopFilterFactory",
              "LowerCaseFilterFactory",
              "TrimFilterFactory",
              "ASCIIFoldingFilterFactory",
      "EdgeNGramFilterFactory"        
           ]
        },
           "exactish": {
           "tokenizer": "keyword",
           "filter": [
              
              "LowerCaseFilterFactory"
           ]
        },
           "text_general_likely_new": {
           "tokenizer": "standard",
           "filter": [
              "StopFilterFactory",
              "LowerCaseFilterFactory",
              "SynonymFilterFactory",
              "ASCIIFoldingFilterFactory"        
           ]
        }
     }
  }

```

}  
}

which acknowledge true, but when i tried to use this multiple custom analyzer(text\_general\_best,exactish,text\_general\_likely\_new) like this:

GET /historical\_new\_one/\_search  
{

"query": {

```
  "bool": {
   
  
    
    "must": [
      {
        
        "match": {
         
          "bank_client_entity_name": {
            "query": "Federal",
            "analyzer": ["text_general_likely_new","text_general_best","exactish"]
     
            
          }
          
          
        }
      }
    ]
       }

```

}  
}

It is showing error:

{  
"error": {  
"root\_cause": [  
{  
"type": "parsing\_exception",  
"reason": "[match] unknown token [START\_ARRAY] after [analyzer]",  
"line": 16,  
"col": 29  
}  
],  
"type": "parsing\_exception",  
"reason": "[match] unknown token [START\_ARRAY] after [analyzer]",  
"line": 16,  
"col": 29  
},  
"status": 400  
}

Please reply for possible ways to use multiple analyzer at a time.

---

<div class="post-metadata">

**Author:** ![thn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thn/32/8061_2.png) [@thn](https://discuss.elastic.co/u/thn)\
**Post date:** [September 5, 2017, 4:07pm UTC](https://discuss.elastic.co/t/unable-to-apply-multiple-analyzer/99293/2 "2017-09-05T16:07:02Z")

</div>

finding the exact cause in this case sometimes is very challenging... I normally do one at a time (like setting up a filter, test it... if it works, add the next filter, etc... then an analyzer and so on) Otherwise, it's hard to tell.

---

<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:** [October 3, 2017, 4:07pm UTC](https://discuss.elastic.co/t/unable-to-apply-multiple-analyzer/99293/3 "2017-10-03T16:07:06Z")

</div>

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