# How HighlightBuilder work on wildcardQuery

**URL:** <https://discuss.elastic.co/t/how-highlightbuilder-work-on-wildcardquery/108838>\
**Category:** Elasticsearch\
**Created:** [November 23, 2017, 8:21am UTC](https://discuss.elastic.co/t/how-highlightbuilder-work-on-wildcardquery/108838 "2017-11-23T08:21:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dearnero](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dearnero](https://discuss.elastic.co/u/dearnero)\
**Post date:** [November 23, 2017, 8:21am UTC](https://discuss.elastic.co/t/how-highlightbuilder-work-on-wildcardquery/108838/1 "2017-11-23T08:21:20Z")

</div>

i have a field(not\_analyzed)

now i want to use wildcardQuery work on this field.

for example：

i use 'hell\*' to query, and expect ‘_hell_o,world’

not ‘_hello,world_’

---

<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:** [November 23, 2017, 9:19am UTC](https://discuss.elastic.co/t/how-highlightbuilder-work-on-wildcardquery/108838/2 "2017-11-23T09:19:30Z")

</div>

First: don't use wildcards!

Then I don't see the difference between `hello,world` and `hello,world`.

Could you provide a full recreation script as described in

> [@About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21):
>
> The heart of the free and open Elastic Stack Elasticsearch is a distributed, RESTful search and analytics engine capable of addressing a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data for lightning fast search, fine‑tuned relevancy, and powerful analytics that scale with ease. warning PLEASE READ THIS SECTION IF IT'S YOUR FIRST POST Some useful links: [elasticsearch reference guide](http://www.elastic.co/guide/en/elasticsearch/reference/current/index.html)[elasticsearch user guide](http://www.elastic.co/guide/en/elasticsearch/guide/current/index.html)[elasticsearch plugins](https://www.elastic.co/guide/en/elasticsearch/plugins/current/index.html)[elasticsearch cl…](https://www.elastic.co/guide/en/elasticsearch/client/index.html)

It will help to better understand what you are doing.  
Please, try to keep the example as simple as possible.

---

<div class="post-metadata">

**Author:** ![dearnero](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dearnero](https://discuss.elastic.co/u/dearnero)\
**Post date:** [November 24, 2017, 2:33am UTC](https://discuss.elastic.co/t/how-highlightbuilder-work-on-wildcardquery/108838/3 "2017-11-24T02:33:55Z")

</div>

First of all, thank you very much！

i want to the result is

```auto
<em> hell</em>o,world

```

。

The actual return

```auto
<em> hello,world</em>

```

i hope the part around by tag

---

<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:** [November 24, 2017, 6:13am UTC](https://discuss.elastic.co/t/how-highlightbuilder-work-on-wildcardquery/108838/4 "2017-11-24T06:13:48Z")

</div>

Do you mean you are using highlighting?

A full reproduction script as I said would help

---

<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:** [December 22, 2017, 6:13am UTC](https://discuss.elastic.co/t/how-highlightbuilder-work-on-wildcardquery/108838/5 "2017-12-22T06:13:49Z")

</div>

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