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

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.
For more options, visit https://groups.google.com/groups/opt_out.

Get Mapping should help: http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/

By default, standard analyzer is used.

HTH

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

Le 2 juin 2013 à 12:28, 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks David, but this is not quite what I was looking for. Calling
something like 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.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/

By default, standard analyzer is used.

HTH

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

Le 2 juin 2013 à 12:28, 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 <javascript:>.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

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 wrote:

Thanks David, but this is not quite what I was looking for. Calling
something like 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.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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 2 juin 2013 à 12:28, 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.

For more options, visit https://groups.google.com/**groups/opt_outhttps://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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

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 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 wrote:

Thanks David, but this is not quite what I was looking for. Calling
something like 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.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 :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 2 juin 2013 à 12:28, 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.

For more options, visit https://groups.google.com/**groups/opt_outhttps://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.
For more options, visit 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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.