# Highlighting on new wildcard field?

**URL:** <https://discuss.elastic.co/t/highlighting-on-new-wildcard-field/305525>\
**Category:** Elasticsearch\
**Created:** [May 24, 2022, 3:42pm UTC](https://discuss.elastic.co/t/highlighting-on-new-wildcard-field/305525 "2022-05-24T15:42:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![schmitch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/schmitch/32/12142_2.png) [@schmitch](https://discuss.elastic.co/u/schmitch)\
**Post date:** [May 24, 2022, 3:42pm UTC](https://discuss.elastic.co/t/highlighting-on-new-wildcard-field/305525/1 "2022-05-24T15:42:38Z")

</div>

hello,

we tried to highlight on a new wildcard field type, unfortunatly it looks non working.  
is there any way to get this working?

since most of our queries use infixes and we prefer to have them highlighted a wildcard field type would be a good fit.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [May 25, 2022, 6:51am UTC](https://discuss.elastic.co/t/highlighting-on-new-wildcard-field/305525/2 "2022-05-25T06:51:31Z")

</div>

Highlighters to date have largely worked on the basis that both queries and document text can be reduced to a stream of tokens (usually words) and markup is added around the tokens in common.  
However the wildcard field supports arbitrary character-sequence matching using regex or wildcard expressions so is an entirely different basis for matching which could span long sequences rather than small words.  
You would probably need to implement your own highlighting in your client which may not be as hard as it sounds because regex support is in most languages and includes match offsets.

---

<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:** [June 22, 2022, 6:52am UTC](https://discuss.elastic.co/t/highlighting-on-new-wildcard-field/305525/3 "2022-06-22T06:52:18Z")

</div>

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