# What is the best way to handle common term which contains special chars, like C#, C++

**URL:** <https://discuss.elastic.co/t/what-is-the-best-way-to-handle-common-term-which-contains-special-chars-like-c-c/76806>\
**Category:** Elasticsearch\
**Created:** [February 28, 2017, 3:17pm UTC](https://discuss.elastic.co/t/what-is-the-best-way-to-handle-common-term-which-contains-special-chars-like-c-c/76806 "2017-02-28T15:17:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [February 28, 2017, 3:17pm UTC](https://discuss.elastic.co/t/what-is-the-best-way-to-handle-common-term-which-contains-special-chars-like-c-c/76806/1 "2017-02-28T15:17:19Z")

</div>

I have some documents contains c# or c++ in title which use standard analyzer. When I query c# on title field, I got all c# and C++ documents, and c++ documents even have higher score than c# document. That makes sense, since both '#' and '++' are removed from token by standard analyzer, so both C# and C++ are converted to 'C' in inverse index table.

Then what is the best way to handle this kind special terms? In my case specifically, I want c# documents got higher score than c++ documents when searching for "C#".

---

<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:** [March 28, 2017, 3:17pm UTC](https://discuss.elastic.co/t/what-is-the-best-way-to-handle-common-term-which-contains-special-chars-like-c-c/76806/2 "2017-03-28T15:17:24Z")

</div>

Closed on March 28, 2017, 3:17pm UTC

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