# Question about analyzers and special characters

**URL:** <https://discuss.elastic.co/t/question-about-analyzers-and-special-characters/8824>\
**Category:** Elasticsearch\
**Created:** [August 23, 2012, 1:09am UTC](https://discuss.elastic.co/t/question-about-analyzers-and-special-characters/8824 "2012-08-23T01:09:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Duarte\_Figuei](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@Daniel\_Duarte\_Figuei](https://discuss.elastic.co/u/Daniel_Duarte_Figuei)\
**Post date:** [August 23, 2012, 1:09am UTC](https://discuss.elastic.co/t/question-about-analyzers-and-special-characters/8824/1 "2012-08-23T01:09:04Z")

</div>

Hello,  
I am indexing documents called "Posts" and "Tags". I have tags such as C++,  
C, C# and so on. When I want to see if a tag name already exists, I use a  
text query in the field name, but then it ignores the special characters  
and I get more than one tag, and I wanted just the one with exact name.  
I found this answer to the problem:  
[https://groups.google.com/forum/#!searchin/elasticsearch/special$20characters/elasticsearch/vsZv6eFxC3Q/ffGrZjrArhkJ](https://groups.google.com/forum/#!searchin/elasticsearch/special%2420characters/elasticsearch/vsZv6eFxC3Q/ffGrZjrArhkJ)

But I don't know very much about analyzers. Do I need to index the  
documents with the "not\_analyzed" field, or can I keep indexing them with  
the default analyzer and use the "not\_analyzed" property only when I want  
to retrieve the tags by name?

--

---

<div class="post-metadata">

**Author:** ![Daniel\_Duarte\_Figuei](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@Daniel\_Duarte\_Figuei](https://discuss.elastic.co/u/Daniel_Duarte_Figuei)\
**Post date:** [August 23, 2012, 1:14am UTC](https://discuss.elastic.co/t/question-about-analyzers-and-special-characters/8824/2 "2012-08-23T01:14:55Z")

</div>

Update: I tried setting the "not\_analyzed" field in the text query and now  
I am not getting any results..

Em quarta-feira, 22 de agosto de 2012 22h09min04s UTC-3, Daniel Duarte  
Figueiredo escreveu:

> Hello,  
> I am indexing documents called "Posts" and "Tags". I have tags such as  
> C++, C, C# and so on. When I want to see if a tag name already exists, I  
> use a text query in the field name, but then it ignores the special  
> characters and I get more than one tag, and I wanted just the one with  
> exact name.  
> I found this answer to the problem:
> 
> [Redirecting to Google Groups](https://groups.google.com/forum/#!searchin/elasticsearch/special$20characters/elasticsearch/vsZv6eFxC3Q/ffGrZjrArhkJ)
> 
> But I don't know very much about analyzers. Do I need to index the  
> documents with the "not\_analyzed" field, or can I keep indexing them with  
> the default analyzer and use the "not\_analyzed" property only when I want  
> to retrieve the tags by name?

--

---

<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:** [August 23, 2012, 6:54am UTC](https://discuss.elastic.co/t/question-about-analyzers-and-special-characters/8824/3 "2012-08-23T06:54:38Z")

</div>

A full curl recreation could help to understand your issue.  
See [http://www.elasticsearch.org/help/](http://www.elasticsearch.org/help/)

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 août 2012 à 03:14, Daniel Duarte Figueiredo [danielduartefigueiredo@gmail.com](mailto:danielduartefigueiredo@gmail.com) a écrit :

Update: I tried setting the "not\_analyzed" field in the text query and now I am not getting any results..

## Em quarta-feira, 22 de agosto de 2012 22h09min04s UTC-3, Daniel Duarte Figueiredo escreveu: Hello, I am indexing documents called "Posts" and "Tags". I have tags such as C++, C, C# and so on. When I want to see if a tag name already exists, I use a text query in the field name, but then it ignores the special characters and I get more than one tag, and I wanted just the one with exact name. I found this answer to the problem: [https://groups.google.com/forum/#!searchin/elasticsearch/special$20characters/elasticsearch/vsZv6eFxC3Q/ffGrZjrArhkJ](https://groups.google.com/forum/#!searchin/elasticsearch/special%2420characters/elasticsearch/vsZv6eFxC3Q/ffGrZjrArhkJ) But I don't know very much about analyzers. Do I need to index the documents with the "not\_analyzed" field, or can I keep indexing them with the default analyzer and use the "not\_analyzed" property only when I want to retrieve the tags by name?

--

---

<div class="post-metadata">

**Author:** ![lamrwhite](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lamrwhite/32/2748_2.png) [@lamrwhite](https://discuss.elastic.co/u/lamrwhite)\
**Post date:** [August 25, 2012, 10:38am UTC](https://discuss.elastic.co/t/question-about-analyzers-and-special-characters/8824/4 "2012-08-25T10:38:24Z")

</div>

Through [http://www.elasticsearch.org/help/](http://www.elasticsearch.org/help/).....you would find the best help and can have your issues resolved soon!!

---

<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:15am UTC](https://discuss.elastic.co/t/question-about-analyzers-and-special-characters/8824/5 "2017-07-06T03:15:03Z")

</div>


