# How to Make a field analyzed without spliting it?

**URL:** <https://discuss.elastic.co/t/how-to-make-a-field-analyzed-without-spliting-it/56201>\
**Category:** Elasticsearch\
**Created:** [July 22, 2016, 6:21pm UTC](https://discuss.elastic.co/t/how-to-make-a-field-analyzed-without-spliting-it/56201 "2016-07-22T18:21:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [July 22, 2016, 6:21pm UTC](https://discuss.elastic.co/t/how-to-make-a-field-analyzed-without-spliting-it/56201/1 "2016-07-22T18:21:21Z")

</div>

Hi Experts,

I have a one field message:`address=abc-bcd-asd.com ,name=vikas_gopal` . I am making message field analyzed (ES default analyzed field)but the problem it when I show this in a table it is like  
message count  
abc --------- 1  
bcd --------- 1  
asd --------- 1  
com ---------1  
name -------1  
vikas -------- 1  
gopal --------1

I know I can use .raw field but I am afraid I do not want to do that.Any idea that I can achieve this , i mean filed should be analyzed but it should be visible like(it should not split after a special character like - or .)

message count  
name-----------------------1  
address--------------------1  
[abc-bcd-asd.com](http://abc-bcd-asd.com) ------ 1  
vikas\_gopal ------------- 1

Thanks  
VG

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [July 23, 2016, 6:10am UTC](https://discuss.elastic.co/t/how-to-make-a-field-analyzed-without-spliting-it/56201/2 "2016-07-23T06:10:22Z")

</div>

You can use custom analyzer to split data in the way you want. But it seems that you have key-value data, why don't you use Logstash filter to split them before sending to ES?  
[https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html](https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html)

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [July 23, 2016, 9:40am UTC](https://discuss.elastic.co/t/how-to-make-a-field-analyzed-without-spliting-it/56201/3 "2016-07-23T09:40:53Z")

</div>

thanks @anhlqn

Sorry I was not clear with my query, yes I am aware that I can use kv filter but what I want is to check which word or string repeats itself , so that i can replace string . Somethings like if a word or a string is getting repeated more than 20 times , i'll replace it with short string .I thought if I make message field an analyzed filed and visualize it in tabular form I will get words with respective count . Though i achieved it but the only problem is, it splits whenever it found a special character .

How I can force elasticsearch no to split words based on special character ? Space is fine .

Is there any specific customized analyzer which can solve my problem ?

Thanks  
VG

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [July 23, 2016, 2:25pm UTC](https://discuss.elastic.co/t/how-to-make-a-field-analyzed-without-spliting-it/56201/4 "2016-07-23T14:25:27Z")

</div>

> **[Elasticsearch Analyzers (or How I Learned to Stop Worrying and Love Custom...](https://tryolabs.com/blog/2015/02/25/elasticsearch-analyzers-or-how-i-learned-to-stop-worrying-and-love-custom-filters/)**
>
> We at Tryolabs are big fans of Elasticsearch, so much we are even sponsoring the first ever Elasticon which is taking place in March in San Francisco.
> We are diving a little deeper in more interesting features and this time we are going to talk about...

> **[Applying Elasticsearch Custom Analyzers](https://qbox.io/blog/applying-elasticsearch-analyzers)**
>
> In the previous blog in our analyzer series we learned, in detail, about the creation of an inverted index, the components of an analyzer, and watched a simple example of how to use those analyzer components as a single entity and analyze the input...

Just create a custom analyzer and choose the tokenizer, char filter, and token filters that match your purpose.

---

<div class="post-metadata">

**Author:** ![vikas\_gopal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vikas_gopal/32/47661_2.png) [@vikas\_gopal](https://discuss.elastic.co/u/vikas_gopal)\
**Post date:** [July 24, 2016, 12:48pm UTC](https://discuss.elastic.co/t/how-to-make-a-field-analyzed-without-spliting-it/56201/5 "2016-07-24T12:48:29Z")

</div>

Thanks this helps.

---

<div class="post-metadata">

**Author:** ![DiscussBuster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/discussbuster/32/11042_2.png) [@DiscussBuster](https://discuss.elastic.co/u/DiscussBuster)\
**Post date:** [July 25, 2016, 4:27am UTC](https://discuss.elastic.co/t/how-to-make-a-field-analyzed-without-spliting-it/56201/6 "2016-07-25T04:27:07Z")

</div>

You may be interested in the keyword tokenizer/analyzer (depending on your version).

---

<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 5, 2017, 10:33pm UTC](https://discuss.elastic.co/t/how-to-make-a-field-analyzed-without-spliting-it/56201/7 "2017-07-05T22:33:16Z")

</div>


