# Highlight field is empty

**URL:** <https://discuss.elastic.co/t/highlight-field-is-empty/264458>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [February 16, 2021, 4:52pm UTC](https://discuss.elastic.co/t/highlight-field-is-empty/264458 "2021-02-16T16:52:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrartiga](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jrartiga](https://discuss.elastic.co/u/jrartiga)\
**Post date:** [February 16, 2021, 4:52pm UTC](https://discuss.elastic.co/t/highlight-field-is-empty/264458/1 "2021-02-16T16:52:31Z")

</div>

Hi all,  
I'm using the [Swiftype: Application Search, Site Search and Enterprise Search Platform](https://search-api.swiftype.com/api/v1/engines) API and I'm concern about why for some results the highlight field comes empty, that field always should return values right?

I was reading the documentation : [API Overview | Swiftype Documentation](https://swiftype.com/documentation/site-search/overview#freetext_query_syntax)

[https://lucene.apache.org/core/3\_0\_3/queryparsersyntax.html](https://lucene.apache.org/core/3_0_3/queryparsersyntax.html)

> **[Search | Swiftype Documentation](https://swiftype.com/documentation/site-search/searching)**
>
> Learn how to get the most out of Swiftype

So I guess it has something to do with the query, I know that is supported special character, because I have notice that the search results are fine with special characters, but the highlight field is coming empty.

Any thoughts about it?

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [February 16, 2021, 5:40pm UTC](https://discuss.elastic.co/t/highlight-field-is-empty/264458/2 "2021-02-16T17:40:45Z")

</div>

Hello Jose!

The highlight fields might not contain anything if there was no exact query match. You can use the `fallback` parameter to ensure something is returned every time. More on this behavior is outlined here: [Highlight Fields | Swiftype Documentation](https://swiftype.com/documentation/site-search/searching/highlight-fields).

I also want to note that I'm assuming you're working with Swiftype, and not [Elastic App Search](https://www.elastic.co/app-search/). Do correct me if that's not the case.

Let me know if that helps!

Ross

---

<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 16, 2021, 5:40pm UTC](https://discuss.elastic.co/t/highlight-field-is-empty/264458/3 "2021-03-16T17:40:49Z")

</div>

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