# How to remove /n characters from index

**URL:** <https://discuss.elastic.co/t/how-to-remove-n-characters-from-index/153828>\
**Category:** Elasticsearch\
**Created:** [October 24, 2018, 2:24pm UTC](https://discuss.elastic.co/t/how-to-remove-n-characters-from-index/153828 "2018-10-24T14:24:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anveshdd](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@anveshdd](https://discuss.elastic.co/u/anveshdd)\
**Post date:** [October 24, 2018, 2:24pm UTC](https://discuss.elastic.co/t/how-to-remove-n-characters-from-index/153828/1 "2018-10-24T14:24:39Z")

</div>

Hi,

I am working on ES 6.3.X and I am using a external web crawler to crawl the data and when I check the index it has a lot of new line characters. Is there any suggestions to avoid the new line characters.

> ```
> \tAbout\n\tSchools\n\tProspective Students\n\tGalleries\n\tNews\n\tEvents\n\tFaculty & Staff\n\tContact\n\n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n \n\n \n\n \n\n \n\n \n\n\n \n\n \n\n \n\n \n\n\n \n \n \n About\n \n \n Schools\n \n \n Prospective Students\n \n \n Galleries\n \n \n News\n \n \n Events\n
> 
> ```

---

<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:** [October 24, 2018, 3:15pm UTC](https://discuss.elastic.co/t/how-to-remove-n-characters-from-index/153828/2 "2018-10-24T15:15:02Z")

</div>

Why not solving that in your crawler directly?

---

<div class="post-metadata">

**Author:** ![anveshdd](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@anveshdd](https://discuss.elastic.co/u/anveshdd)\
**Post date:** [October 24, 2018, 3:40pm UTC](https://discuss.elastic.co/t/how-to-remove-n-characters-from-index/153828/3 "2018-10-24T15:40:46Z")

</div>

I tried in my crawler but I have a limited resources on that. That's the reason I posted here whether any solution for that in elastic search side.

---

<div class="post-metadata">

**Author:** ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)\
**Post date:** [October 24, 2018, 4:17pm UTC](https://discuss.elastic.co/t/how-to-remove-n-characters-from-index/153828/4 "2018-10-24T16:17:38Z")

</div>

Hi,

You can look a filters to add to your mapping, in my project I have a filter like this one for special chars:

Doc: [https://www.elastic.co/guide/en/elasticsearch/reference/6.4/analysis-custom-analyzer.html#\_configuration\_8](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/analysis-custom-analyzer.html#_configuration_8)

```
        "char_filter" : {
            "custom-quotes" : {
                "mappings" : [
                    "\\u0091=>\\u0027",
                    "\\u0092=>\\u0027",
                    "\\u2018=>\\u0027",
                    "\\u2019=>\\u0027",
                    "\\u201B=>\\u0027",
                    "\\uFF07=>\\u0027"
                ],
                "type" : "mapping"
            }
		}

```

bye,  
Xavier

---

<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:** [November 21, 2018, 4:17pm UTC](https://discuss.elastic.co/t/how-to-remove-n-characters-from-index/153828/5 "2018-11-21T16:17:43Z")

</div>

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