# Listing available analyzers via API

**URL:** <https://discuss.elastic.co/t/listing-available-analyzers-via-api/16472>\
**Category:** Elasticsearch\
**Created:** [March 19, 2014, 4:46pm UTC](https://discuss.elastic.co/t/listing-available-analyzers-via-api/16472 "2014-03-19T16:46:39Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [March 19, 2014, 10:16pm UTC](https://discuss.elastic.co/t/listing-available-analyzers-via-api/16472/3 "2014-03-19T22:16:21Z")

</div>

Kevin.

Do you mean the index settings query API? For example, I issued the  
following query against my sgen (schema generation, an experimental index  
for exploring Elasticsearch mapping nooks and crannies):

$ curl -XGET '[http://localhost:9200/sgen/\_settings?pretty=true](http://localhost:9200/sgen/_settings?pretty=true)' && echo

And it gives me the following, which makes it easy (at least by looking at  
the JSON and my experience with parsing JSON) to deterministically list all  
of the custom analyzers that are defined:

{  
"sgen" : {  
"settings" : {  
"index" : {  
"uuid" : "ecznJNykSl-DguwyN6SIZg",  
"number\_of\_replicas" : "0",  
"analysis" : {  
"char\_filter" : {  
"finnish\_char\_mapper" : {  
"type" : "mapping",  
"mappings" : ["Å=\>O", "å=\>o", "W=\>V", "w=\>v"]  
}  
},  
"analyzer" : {  
"english\_standard\_analyzer" : {  
"type" : "custom",  
"filter" : ["standard", "lowercase", "asciifolding"],  
"tokenizer" : "standard"  
},  
"finnish\_stemming\_analyzer" : {  
"type" : "custom",  
"char\_filter" : ["finnish\_char\_mapper"],  
"filter" : [ "standard", "lowercase",  
"finnish\_snowball\_filter" ],  
"tokenizer" : "standard"  
},  
"english\_stemming\_analyzer" : {  
"type" : "custom",  
"filter" : [ "standard", "lowercase", "asciifolding",  
"english\_snowball\_filter" ],  
"tokenizer" : "standard"  
},  
"english\_stemming\_stop\_analyzer" : {  
"type" : "custom",  
"filter" : [ "standard", "lowercase", "asciifolding",  
"english\_stop\_filter", "english\_snowball\_filter" ],  
"tokenizer" : "standard"  
},  
"russian\_stemming\_analyzer" : {  
"type" : "custom",  
"filter" : [ "standard", "lowercase",  
"russian\_snowball\_filter" ],  
"tokenizer" : "standard"  
},  
"arabic\_stemming\_Arabic\_analyzer" : {  
"type" : "custom",  
"filter" : [ "standard", "lowercase",  
"Arabic\_stemming\_filter" ],  
"tokenizer" : "standard"  
}  
},  
"filter" : {  
"finnish\_snowball\_filter" : {  
"type" : "snowball",  
"language" : "Finnish"  
},  
"english\_stop\_filter" : {  
"type" : "stop",  
"language" : ["_english_"]  
},  
"english\_snowball\_filter" : {  
"type" : "snowball",  
"language" : "English"  
},  
"russian\_snowball\_filter" : {  
"type" : "snowball",  
"language" : "Russian"  
},  
"Arabic\_stemming\_filter" : {  
"type" : "stemmer",  
"name" : "Arabic"  
}  
}  
},  
"number\_of\_shards" : "1",  
"refresh\_interval" : "2s",  
"version" : {  
"created" : "1000099"  
}  
}  
}  
}  
}

Since in my case I never use a built-in analyzer, I don't need to query the  
field mappings to find them, nor do I need to depend on ES to dynamically  
detect the "correct" mapping (I turn all that stuff off). So the bottom  
line is: Disabling auto-index creation and auto-type mapping of new fields  
makes the system more robust, and has the wonderful side effect of making  
discovery of the schema easy and deterministic!

But for the available built-in analyzers, the Java side might be possible  
by listing the analyzer classes in the org.elasticsearch.index.analysispackage. It would involve a bit of Java reflection to automate this, but  
perhaps it could be done.

Hope this helps!

Brian

--  
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/8f28a827-9627-4e6d-95af-d3ee78ca83c7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8f28a827-9627-4e6d-95af-d3ee78ca83c7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

_[View the full topic](https://discuss.elastic.co/t/listing-available-analyzers-via-api/16472)._
