# Configuring analyzer for entire schema

**URL:** <https://discuss.elastic.co/t/configuring-analyzer-for-entire-schema/13497>\
**Category:** Elasticsearch\
**Created:** [September 6, 2013, 5:56pm UTC](https://discuss.elastic.co/t/configuring-analyzer-for-entire-schema/13497 "2013-09-06T17:56:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vrkiran](https://avatars.discourse-cdn.com/v4/letter/v/b9bd4f/32.png) [@vrkiran](https://discuss.elastic.co/u/vrkiran)\
**Post date:** [September 6, 2013, 5:56pm UTC](https://discuss.elastic.co/t/configuring-analyzer-for-entire-schema/13497/1 "2013-09-06T17:56:17Z")

</div>

I know that you can configure an analyzer per field via \_mapping, but if I  
want to configure an analyzer or tokenizer for an entire schema  
(unfortunately, I do not know the schema upfront), is there a way? Any  
examples will be highly appreciated.

The real problem I am trying to solve is avoid tokenization for some of the  
fileds that I need to facet on. I need the facets to count the exact phrase  
and not tokenized pieces. However, there are tons of fields that fall into  
the above and I do not know want to configure each such attribute  
individually.

Thanks  
R

--  
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:** [September 6, 2013, 7:18pm UTC](https://discuss.elastic.co/t/configuring-analyzer-for-entire-schema/13497/2 "2013-09-06T19:18:09Z")

</div>

You can change the default analyzer at the index level [1]. "Schemas" tend  
to be organized per type, but since each similarly named field is shared in  
the index, each field should have the same analysis.

Of course, the default analyzer will be used on every field. You can change  
the analyzer per field if you match on certain attributes such as name or  
type [2].

[1] [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/)  
(Scroll  
down to default analyzers)  
[2] [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/root-object-type/)  
(Scroll  
down to dynamic\_templates)

Cheers,

Ivan

On Fri, Sep 6, 2013 at 10:56 AM, vrkiran [valmikam@gmail.com](mailto:valmikam@gmail.com) wrote:

> I know that you can configure an analyzer per field via \_mapping, but if I  
> want to configure an analyzer or tokenizer for an entire schema  
> (unfortunately, I do not know the schema upfront), is there a way? Any  
> examples will be highly appreciated.
> 
> The real problem I am trying to solve is avoid tokenization for some of  
> the fileds that I need to facet on. I need the facets to count the exact  
> phrase and not tokenized pieces. However, there are tons of fields that  
> fall into the above and I do not know want to configure each such attribute  
> individually.
> 
> Thanks  
> R
> 
> --  
> 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:17am UTC](https://discuss.elastic.co/t/configuring-analyzer-for-entire-schema/13497/3 "2017-07-06T02:17:44Z")

</div>

Closed on July 6, 2017, 2:17am UTC


