# Determine which analyzer is used for a given index/type/field

**URL:** <https://discuss.elastic.co/t/determine-which-analyzer-is-used-for-a-given-index-type-field/12223>\
**Category:** Elasticsearch\
**Created:** [June 2, 2013, 10:28am UTC](https://discuss.elastic.co/t/determine-which-analyzer-is-used-for-a-given-index-type-field/12223 "2013-06-02T10:28:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hillel\_t](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@hillel\_t](https://discuss.elastic.co/u/hillel_t)\
**Post date:** [June 2, 2013, 10:28am UTC](https://discuss.elastic.co/t/determine-which-analyzer-is-used-for-a-given-index-type-field/12223/1 "2013-06-02T10:28:53Z")

</div>

Hey all,

Is there a way to use the REST API to determine which analyzer  
elasticsearch is using for a given index? how about a given type or a  
specific field?

Thanks,

-- Hillel

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 2, 2013, 10:53am UTC](https://discuss.elastic.co/t/determine-which-analyzer-is-used-for-a-given-index-type-field/12223/2 "2013-06-02T10:53:25Z")

</div>

Get Mapping should help: [Elastic — The Search AI Company | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/)

By default, standard analyzer is used.

## HTH

David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 2 juin 2013 à 12:28, [hillel.t@gmail.com](mailto:hillel.t@gmail.com) a écrit :

> Hey all,
> 
> Is there a way to use the REST API to determine which analyzer elasticsearch is using for a given index? how about a given type or a specific field?
> 
> Thanks,
> 
> ## -- Hillel
> 
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![hillel\_t](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@hillel\_t](https://discuss.elastic.co/u/hillel_t)\
**Post date:** [June 4, 2013, 10:50am UTC](https://discuss.elastic.co/t/determine-which-analyzer-is-used-for-a-given-index-type-field/12223/3 "2013-06-04T10:50:08Z")

</div>

Thanks David, but this is not quite what I was looking for. Calling  
something like [http://localhost:9200/index\_name/\_mapping](http://localhost:9200/index_name/_mapping) gives me the value  
of the analyzer field if one was defined, but for me it's insufficient for  
several reasons:

1. Sometime the index was configured with a default analyzer that's  
different from the standard analyzer (i.e. with the  
"settings":{"index":{analysis":{"analyzer":{"defalut{...}}}}} clause). In  
these cases calling index\_name/\_mapping gives me no indication of the  
effective analysis settings.
2. On my system, even in cases where a specific analyzer is selected for an  
index (or type/field), it's often a custom one, so all \_mapping tells me  
about it is its name and I know nothing about its effective settings (i.e.  
which tokenizer and filters it's using).

I also know that I can use the \_analyze API to examine the analysis results  
for specific words, but what I'm looking for is for an API call that given  
an index, type, or field name, will provide me with the effective analysis  
options: analyzer name, tokenizer in use, filters in use, etc. It's also  
helpful if there's a call that given a custom analyzer's name provides me  
with its settings (although that still won't solve the problem of finding  
out the settings for indices defined with a custom default analyzer).

-- Hillel

On Sunday, June 2, 2013 1:53:25 PM UTC+3, David Pilato wrote:

> Get Mapping should help:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/)
> 
> By default, standard analyzer is used.
> 
> ## HTH
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 2 juin 2013 à 12:28, [hill...@gmail.com](mailto:hill...@gmail.com) \<javascript:\> a écrit :
> 
> Hey all,
> 
> Is there a way to use the REST API to determine which analyzer  
> elasticsearch is using for a given index? how about a given type or a  
> specific field?
> 
> Thanks,
> 
> -- Hillel
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 5, 2013, 6:16pm UTC](https://discuss.elastic.co/t/determine-which-analyzer-is-used-for-a-given-index-type-field/12223/4 "2013-06-05T18:16:46Z")

</div>

As far as I can tell, the internals of the AnalysisModule/AnalysisService  
are not exposed via an API. It would be interesting to have, but looking up  
the configuration is just as easy (assuming you have access).

--  
Ivan

On Tue, Jun 4, 2013 at 3:50 AM, [hillel.t@gmail.com](mailto:hillel.t@gmail.com) wrote:

> Thanks David, but this is not quite what I was looking for. Calling  
> something like [http://localhost:9200/index\_name/\_mapping](http://localhost:9200/index_name/_mapping) gives me the  
> value of the analyzer field if one was defined, but for me it's  
> insufficient for several reasons:
> 
> 1. Sometime the index was configured with a default analyzer that's  
> different from the standard analyzer (i.e. with the  
> "settings":{"index":{analysis":{"analyzer":{"defalut{...}}}}} clause). In  
> these cases calling index\_name/\_mapping gives me no indication of the  
> effective analysis settings.
> 2. On my system, even in cases where a specific analyzer is selected for  
> an index (or type/field), it's often a custom one, so all \_mapping tells me  
> about it is its name and I know nothing about its effective settings (i.e.  
> which tokenizer and filters it's using).
> 
> I also know that I can use the \_analyze API to examine the analysis  
> results for specific words, but what I'm looking for is for an API call  
> that given an index, type, or field name, will provide me with the  
> effective analysis options: analyzer name, tokenizer in use, filters in  
> use, etc. It's also helpful if there's a call that given a custom  
> analyzer's name provides me with its settings (although that still won't  
> solve the problem of finding out the settings for indices defined with a  
> custom default analyzer).
> 
> -- Hillel
> 
> On Sunday, June 2, 2013 1:53:25 PM UTC+3, David Pilato wrote:
> 
> > Get Mapping should help: [http://www](http://www).**[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/guide/)**  
> > reference/api/admin-indices-\*\*get-mapping/[http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/](http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/)
> > 
> > By default, standard analyzer is used.
> > 
> > ## HTH
> > 
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 2 juin 2013 à 12:28, [hill...@gmail.com](mailto:hill...@gmail.com) a écrit :
> > 
> > Hey all,
> > 
> > Is there a way to use the REST API to determine which analyzer  
> > elasticsearch is using for a given index? how about a given type or a  
> > specific field?
> > 
> > Thanks,
> > 
> > -- Hillel
> > 
> > --  
> > 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 elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > .
> > 
> > --  
> > 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).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 7, 2013, 10:47am UTC](https://discuss.elastic.co/t/determine-which-analyzer-is-used-for-a-given-index-type-field/12223/5 "2013-06-07T10:47:37Z")

</div>

if all the custom analyzes are configured on the index level when it is created, getting the index settings will give you that configuration (though flattened)

On Wed, Jun 5, 2013 at 8:16 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> ## As far as I can tell, the internals of the AnalysisModule/AnalysisService are not exposed via an API. It would be interesting to have, but looking up the configuration is just as easy (assuming you have access).
> 
> Ivan  
> On Tue, Jun 4, 2013 at 3:50 AM, [hillel.t@gmail.com](mailto:hillel.t@gmail.com) wrote:
> 
> > Thanks David, but this is not quite what I was looking for. Calling  
> > something like [http://localhost:9200/index\_name/\_mapping](http://localhost:9200/index_name/_mapping) gives me the  
> > value of the analyzer field if one was defined, but for me it's  
> > insufficient for several reasons:
> > 
> > 1. Sometime the index was configured with a default analyzer that's  
> > different from the standard analyzer (i.e. with the  
> > "settings":{"index":{analysis":{"analyzer":{"defalut{...}}}}} clause). In  
> > these cases calling index\_name/\_mapping gives me no indication of the  
> > effective analysis settings.
> > 2. On my system, even in cases where a specific analyzer is selected for  
> > an index (or type/field), it's often a custom one, so all \_mapping tells me  
> > about it is its name and I know nothing about its effective settings (i.e.  
> > which tokenizer and filters it's using).
> > 
> > I also know that I can use the \_analyze API to examine the analysis  
> > results for specific words, but what I'm looking for is for an API call  
> > that given an index, type, or field name, will provide me with the  
> > effective analysis options: analyzer name, tokenizer in use, filters in  
> > use, etc. It's also helpful if there's a call that given a custom  
> > analyzer's name provides me with its settings (although that still won't  
> > solve the problem of finding out the settings for indices defined with a  
> > custom default analyzer).
> > 
> > -- Hillel
> > 
> > On Sunday, June 2, 2013 1:53:25 PM UTC+3, David Pilato wrote:
> > 
> > > Get Mapping should help: [http://www](http://www).**[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/guide/)**  
> > > reference/api/admin-indices-\*\*get-mapping/[http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/](http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/)
> > > 
> > > By default, standard analyzer is used.
> > > 
> > > ## HTH
> > > 
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 2 juin 2013 à 12:28, [hill...@gmail.com](mailto:hill...@gmail.com) a écrit :
> > > 
> > > Hey all,
> > > 
> > > Is there a way to use the REST API to determine which analyzer  
> > > elasticsearch is using for a given index? how about a given type or a  
> > > specific field?
> > > 
> > > Thanks,
> > > 
> > > -- Hillel
> > > 
> > > --  
> > > 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 elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > .
> > > 
> > > --  
> > > 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).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> 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).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:32am UTC](https://discuss.elastic.co/t/determine-which-analyzer-is-used-for-a-given-index-type-field/12223/6 "2017-07-06T02:32:20Z")

</div>


