# Clarity on analyzers

**URL:** <https://discuss.elastic.co/t/clarity-on-analyzers/6588>\
**Category:** Elasticsearch\
**Created:** [February 3, 2012, 8:05pm UTC](https://discuss.elastic.co/t/clarity-on-analyzers/6588 "2012-02-03T20:05:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wes\_Plunk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wes_plunk/32/2446_2.png) [@Wes\_Plunk](https://discuss.elastic.co/u/Wes_Plunk)\
**Post date:** [February 3, 2012, 8:05pm UTC](https://discuss.elastic.co/t/clarity-on-analyzers/6588/1 "2012-02-03T20:05:58Z")

</div>

there seems to be two triggers where analyzers are used

1. executed when the field of a document is indexed
2. executed when the field of a document is searched

If you analyze the field of a document when it is first indexed does  
that mean you don't need to analyze it when it is searched?

If a field is analyzed when it is indexed does that mean it is stored  
in the index tokenized (according the analyzer used) forcing you to  
either use the \_source field or another field to retrieve it's  
original form?

---

<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:** [February 5, 2012, 4:21pm UTC](https://discuss.elastic.co/t/clarity-on-analyzers/6588/2 "2012-02-05T16:21:03Z")

</div>

On Friday, February 3, 2012 at 10:05 PM, Wes Plunk wrote:

> there seems to be two triggers where analyzers are used
> 
> 1. executed when the field of a document is indexed
> 2. executed when the field of a document is searched
> 
> If you analyze the field of a document when it is first indexed does  
> that mean you don't need to analyze it when it is searched?

The part the gets analyzed when you search is the text that you search with. The analyzer will automatically be the one associated with the relevant field you search.

> If a field is analyzed when it is indexed does that mean it is stored  
> in the index tokenized (according the analyzer used) forcing you to  
> either use the \_source field or another field to retrieve it's  
> original form?

Depends. You can have a field not being analyzed, and then you can search it "unmodified". Multi field mapping can help with having one version of the field analyzed, and another that is not.

---

<div class="post-metadata">

**Author:** ![Wes\_Plunk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wes_plunk/32/2446_2.png) [@Wes\_Plunk](https://discuss.elastic.co/u/Wes_Plunk)\
**Post date:** [February 6, 2012, 4:00am UTC](https://discuss.elastic.co/t/clarity-on-analyzers/6588/3 "2012-02-06T04:00:19Z")

</div>

Thanks Shay, that's very clear to me now

On Feb 5, 10:21 am, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> On Friday, February 3, 2012 at 10:05 PM, Wes Plunk wrote:
> 
> > there seems to be two triggers where analyzers are used
> 
> > 1. executed when the field of a document is indexed
> > 2. executed when the field of a document is searched
> 
> > If you analyze the field of a document when it is first indexed does  
> > that mean you don't need to analyze it when it is searched?
> 
> The part the gets analyzed when you search is the text that you search with. The analyzer will automatically be the one associated with the relevant field you search.
> 
> > If a field is analyzed when it is indexed does that mean it is stored  
> > in the index tokenized (according the analyzer used) forcing you to  
> > either use the \_source field or another field to retrieve it's  
> > original form?
> 
> Depends. You can have a field not being analyzed, and then you can search it "unmodified". Multi field mapping can help with having one version of the field analyzed, and another that is not.

---

<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, 3:40am UTC](https://discuss.elastic.co/t/clarity-on-analyzers/6588/4 "2017-07-06T03:40:30Z")

</div>

Closed on July 6, 2017, 3:40am UTC


