# Can I search for special characters highlight in Elastic?

**URL:** <https://discuss.elastic.co/t/can-i-search-for-special-characters-highlight-in-elastic/239073>\
**Category:** Elasticsearch\
**Created:** [June 29, 2020, 8:28am UTC](https://discuss.elastic.co/t/can-i-search-for-special-characters-highlight-in-elastic/239073 "2020-06-29T08:28:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![111349](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111349/32/69694_2.png) [@111349](https://discuss.elastic.co/u/111349)\
**Post date:** [June 29, 2020, 8:28am UTC](https://discuss.elastic.co/t/can-i-search-for-special-characters-highlight-in-elastic/239073/1 "2020-06-29T08:28:23Z")

</div>

I am using ElasticSearch RestHighLevelCilent api in java.

Among them, use QueryStringQueryBuilder to input the string I want to search.

Then, the matched string is wrapped around the tag with HighlightBuilder.

Everything works as expected, except for searches involving special characters.

If I search for an encrypted string (eg apple==), the only thing the tag wraps is apple, except for ==.

How can I get the highlights to include special characters? ("apple==")

---

<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 27, 2020, 8:28am UTC](https://discuss.elastic.co/t/can-i-search-for-special-characters-highlight-in-elastic/239073/2 "2020-07-27T08:28:25Z")

</div>

Closed on July 27, 2020, 8:28am UTC

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