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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

hillel.t
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

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

dadoonet

By default, standard analyzer is used.

HTH
--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 2 juin 2013 à 12:28, [hidden email] 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 [hidden email].
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

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

hillel.t
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:

By default, standard analyzer is used.

HTH
--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 2 juin 2013 à 12:28, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Sjlcfk8MxpkJ">hill...@... 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Sjlcfk8MxpkJ">elasticsearc...@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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

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

Ivan Brusic
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, <[hidden email]> 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:

By default, standard analyzer is used.

HTH
--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 2 juin 2013 à 12:28, [hidden email] 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_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 [hidden email].
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

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

kimchy
Administrator
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 <[hidden email]> 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, <[hidden email]> 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:

By default, standard analyzer is used.

HTH
--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

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