# Analyzer for special characters

**URL:** <https://discuss.elastic.co/t/analyzer-for-special-characters/13291>\
**Category:** Elasticsearch\
**Created:** [August 22, 2013, 5:15am UTC](https://discuss.elastic.co/t/analyzer-for-special-characters/13291 "2013-08-22T05:15:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan/32/1927_2.png) [@Juan](https://discuss.elastic.co/u/Juan)\
**Post date:** [August 22, 2013, 5:15am UTC](https://discuss.elastic.co/t/analyzer-for-special-characters/13291/1 "2013-08-22T05:15:54Z")

</div>

Hi,

I want to be able to search on special characters e.g. # and $ using the  
query\_string on multiple fields. I have used the default standard analyzer,  
which caused some issues (es exceptions) when using for instance ~ in the  
query\_string. I have subsequently escaped the characters. The problem is  
that some of the candidates in my index has for instance # in their name,  
but I need to be able to query for something like n#ame\* where name can be  
e.g. n#meA, n#meB etc. Which analyzer is best suited for this scenario?

Thanks

Juan

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 22, 2013, 10:00am UTC](https://discuss.elastic.co/t/analyzer-for-special-characters/13291/2 "2013-08-22T10:00:25Z")

</div>

Hey,

you may want to install the inquisitor plugin (or use the analyze API  
directly) and play around with the existing analyzers in order to find out,  
if an existing analyzer fits your need. Also you can create your own ones  
pretty easy, see more at

> **[GitHub - polyfractal/elasticsearch-inquisitor: Site plugin for Elasticsearch...](https://github.com/polyfractal/elasticsearch-inquisitor)**
>
> Site plugin for Elasticsearch to help understand and debug queries. - GitHub - polyfractal/elasticsearch-inquisitor: Site plugin for Elasticsearch to help understand and debug queries.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--Alex

On Thu, Aug 22, 2013 at 7:15 AM, Juan Herbst [jjherbst@gmail.com](mailto:jjherbst@gmail.com) wrote:

> Hi,
> 
> I want to be able to search on special characters e.g. # and $ using the  
> query\_string on multiple fields. I have used the default standard analyzer,  
> which caused some issues (es exceptions) when using for instance ~ in the  
> query\_string. I have subsequently escaped the characters. The problem is  
> that some of the candidates in my index has for instance # in their name,  
> but I need to be able to query for something like n#ame\* where name can be  
> e.g. n#meA, n#meB etc. Which analyzer is best suited for this scenario?
> 
> Thanks
> 
> Juan
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juan/32/1927_2.png) [@Juan](https://discuss.elastic.co/u/Juan)\
**Post date:** [August 22, 2013, 9:05pm UTC](https://discuss.elastic.co/t/analyzer-for-special-characters/13291/3 "2013-08-22T21:05:47Z")

</div>

Hi Alexander thanks for the feedback, I have installed the plugin and it  
works great. Thanks for the tip.

Juan

On Thursday, 22 August 2013 17:15:54 UTC+12, Juan Herbst wrote:

> Hi,
> 
> I want to be able to search on special characters e.g. # and $ using the  
> query\_string on multiple fields. I have used the default standard analyzer,  
> which caused some issues (es exceptions) when using for instance ~ in the  
> query\_string. I have subsequently escaped the characters. The problem is  
> that some of the candidates in my index has for instance # in their name,  
> but I need to be able to query for something like n#ame\* where name can be  
> e.g. n#meA, n#meB etc. Which analyzer is best suited for this scenario?
> 
> Thanks
> 
> Juan

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:20am UTC](https://discuss.elastic.co/t/analyzer-for-special-characters/13291/4 "2017-07-06T02:20:04Z")

</div>


