# What happens to the original text field?

**URL:** <https://discuss.elastic.co/t/what-happens-to-the-original-text-field/295262>\
**Category:** Elasticsearch\
**Created:** [January 24, 2022, 5:23pm UTC](https://discuss.elastic.co/t/what-happens-to-the-original-text-field/295262 "2022-01-24T17:23:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [January 24, 2022, 5:23pm UTC](https://discuss.elastic.co/t/what-happens-to-the-original-text-field/295262/1 "2022-01-24T17:23:13Z")

</div>

When we use custom or built-in analyzer in our mapping it just convert the stream of characters to stream of tokens.  
For example when we analyze the text like `The QUICK brown foxes jumped over the dog!`.Here i am using custom analyzer which using standard tokenizer and in token filter - lowercase, stemmer  
**Output in lucene index/Inverted index**  
`[the,quick,brown,fox,jump,over,the,lazy,dog]`.

Original text is converted now.The old text is vanished now ? We can't search `QUICK` beacuse now it is `quick` , similarly `foxes` become `fox` we can't search `foxes`. Am i saying right?

---

<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:** [January 24, 2022, 5:40pm UTC](https://discuss.elastic.co/t/what-happens-to-the-original-text-field/295262/2 "2022-01-24T17:40:13Z")

</div>

Yes.

If you want to search for both things, you will need two analyzers.  
You can use [multi fields](https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html) for this.

---

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [January 24, 2022, 6:05pm UTC](https://discuss.elastic.co/t/what-happens-to-the-original-text-field/295262/3 "2022-01-24T18:05:57Z")

</div>

@dadoonet thank you for replying me😀

I have an index

```auto
PUT test_index
{
"settings": {
  "number_of_replicas": 0,
  "analysis": {
    "analyzer": {
      "custom_analyzer":{
        "type":"custom",
        "tokenizer":"standard",
        "filter":["lowercase","stemmer"]
      }
    }
  }
}, 
"mappings": { 
  "properties": {
    "text_field": {
      "type": "text",
      "analyzer": "custom_analyzer"
    }
  }
}
}

```

I am using only index time analysis.

I add the documents in it

```auto
POST test_index/_doc/1
{
  "text_field":"The QUICK brown foxes jumped over the dog!"
}

```

I am able to search QUICK it should not because we have `quick`. Does it mean custom analysis is also applied to query string ,I mean when I search for `QUICK` Elasticsearch analyzer convert this into `quick`. Because it happens only in search time analysis. And if we are not using search time analysis in our mapping does it means it applying to our mapping automatically.

---

<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:** [January 24, 2022, 6:26pm UTC](https://discuss.elastic.co/t/what-happens-to-the-original-text-field/295262/4 "2022-01-24T18:26:49Z")

</div>

`text_field ` is only analyzed with the `custom_analyzer` analyzer.  
Use multi fields instead.

> [@Aniket\_Pant](#):
>
> Does it mean custom analysis is also applied to query string

In most cases, the same analyzer is applied at both index time and search time.

---

<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:** [February 21, 2022, 6:27pm UTC](https://discuss.elastic.co/t/what-happens-to-the-original-text-field/295262/5 "2022-02-21T18:27:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
