# Custom Analyzer Validation

**URL:** <https://discuss.elastic.co/t/custom-analyzer-validation/22385>\
**Category:** Elasticsearch\
**Created:** [February 25, 2015, 2:03pm UTC](https://discuss.elastic.co/t/custom-analyzer-validation/22385 "2015-02-25T14:03:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balasundaram\_Nanthis](https://avatars.discourse-cdn.com/v4/letter/b/f04885/32.png) [@Balasundaram\_Nanthis](https://discuss.elastic.co/u/Balasundaram_Nanthis)\
**Post date:** [February 25, 2015, 2:03pm UTC](https://discuss.elastic.co/t/custom-analyzer-validation/22385/1 "2015-02-25T14:03:28Z")

</div>

We are trying to cover the corner cases in our project and in one of the  
invalid custom analyzer scenarios not captured in validation. The invalid  
custom analyzer is not captured on settings update. Is it a known issue?

PUT [http://localhost:9200/test\_idx](http://localhost:9200/test_idx)  
Content-Type: application/json  
{  
"settings" : {  
"number\_of\_shards" : 3,  
"number\_of\_replicas" : 2  
}  
}  
-- response --  
200 OK  
Content-Type: application/json; charset=UTF-8  
Content-Length: 21

{"acknowledged":true}

=============================

POST [http://localhost:9200/test\_idx/\_close](http://localhost:9200/test_idx/_close)  
Content-Type: application/json

-- response --  
200 OK  
Content-Type: application/json; charset=UTF-8  
Content-Length: 21

{"acknowledged":true}

================================

PUT [http://localhost:9200/test\_idx/\_settings](http://localhost:9200/test_idx/_settings)  
Content-Type: application/json  
{  
"analysis": {  
"analyzer": {  
"my\_custom\_analyzer\_1": {  
"tokenizer": "my\_custom\_tokenizer"  
}  
}  
}  
}  
-- response --  
200 OK  
Content-Type: application/json; charset=UTF-8  
Content-Length: 21

{"acknowledged":true}

===============================

POST [http://localhost:9200/test\_idx/\_open](http://localhost:9200/test_idx/_open)  
Content-Type: application/json

-- response --  
200 OK  
Content-Type: application/json; charset=UTF-8  
Content-Length: 21

{"acknowledged":true}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3eafcb49-c0aa-4bbf-9d90-4559ca831dcb%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3eafcb49-c0aa-4bbf-9d90-4559ca831dcb%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)\
**Post date:** [February 25, 2015, 2:29pm UTC](https://discuss.elastic.co/t/custom-analyzer-validation/22385/2 "2015-02-25T14:29:32Z")

</div>

Thanks for raising this. It looks like this is indeed a bug. I have raised  
an issue for it on  
github: [No validation of custom analyzer when updating index setting on a closed index · Issue #9879 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/9879)

Colin

On Wednesday, 25 February 2015 14:03:28 UTC, Balasundaram Nanthisamy wrote:

> We are trying to cover the corner cases in our project and in one of the  
> invalid custom analyzer scenarios not captured in validation. The invalid  
> custom analyzer is not captured on settings update. Is it a known issue?
> 
> PUT [http://localhost:9200/test\_idx](http://localhost:9200/test_idx)  
> Content-Type: application/json  
> {  
> "settings" : {  
> "number\_of\_shards" : 3,  
> "number\_of\_replicas" : 2  
> }  
> }  
> -- response --  
> 200 OK  
> Content-Type: application/json; charset=UTF-8  
> Content-Length: 21
> 
> {"acknowledged":true}
> 
> =============================
> 
> POST [http://localhost:9200/test\_idx/\_close](http://localhost:9200/test_idx/_close)  
> Content-Type: application/json
> 
> -- response --  
> 200 OK  
> Content-Type: application/json; charset=UTF-8  
> Content-Length: 21
> 
> {"acknowledged":true}
> 
> ================================
> 
> PUT [http://localhost:9200/test\_idx/\_settings](http://localhost:9200/test_idx/_settings)  
> Content-Type: application/json  
> {  
> "analysis": {  
> "analyzer": {  
> "my\_custom\_analyzer\_1": {  
> "tokenizer": "my\_custom\_tokenizer"  
> }  
> }  
> }  
> }  
> -- response --  
> 200 OK  
> Content-Type: application/json; charset=UTF-8  
> Content-Length: 21
> 
> {"acknowledged":true}
> 
> ===============================
> 
> POST [http://localhost:9200/test\_idx/\_open](http://localhost:9200/test_idx/_open)  
> Content-Type: application/json
> 
> -- response --  
> 200 OK  
> Content-Type: application/json; charset=UTF-8  
> Content-Length: 21
> 
> {"acknowledged":true}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f4912afb-a583-46dd-8a96-e69e169a71b5%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f4912afb-a583-46dd-8a96-e69e169a71b5%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:30am UTC](https://discuss.elastic.co/t/custom-analyzer-validation/22385/3 "2017-07-06T00:30:12Z")

</div>


