# Returning matching highlight fields on \_source clause

**URL:** <https://discuss.elastic.co/t/returning-matching-highlight-fields-on--source-clause/75877>\
**Category:** Elasticsearch\
**Created:** [February 21, 2017, 1:01pm UTC](https://discuss.elastic.co/t/returning-matching-highlight-fields-on--source-clause/75877 "2017-02-21T13:01:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![guilherme\_maranhao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guilherme_maranhao/32/101483_2.png) [@guilherme\_maranhao](https://discuss.elastic.co/u/guilherme_maranhao)\
**Post date:** [February 21, 2017, 1:01pm UTC](https://discuss.elastic.co/t/returning-matching-highlight-fields-on--source-clause/75877/1 "2017-02-21T13:01:30Z")

</div>

Hi everyone,

How can I force a highlight field for being retrieved as a source field if there was a match on it? I don't want to define this field in the source clause previously, for instance.

```
_source:{
	field_1,
    object_field_2.field_3,
	object_field_2.field_4
}

highlight:{
	objetct_field_2.field_5
}

```

If there is a matching highlight on objetct\_field\_2.field\_5 field, I would like it to be included in the \_source clause, nested to object\_field\_2.  
I've tried force\_source: true parameter inside highlight.objetct\_field\_2.field\_5, but it didn't work as I expected:

`'objetct_field_2.field_5': { force_source: true }`

Does anybody know if it is possible to do that?

Thanks,

Guilherme

---

<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 21, 2017, 1:01pm UTC](https://discuss.elastic.co/t/returning-matching-highlight-fields-on--source-clause/75877/2 "2017-03-21T13:01:41Z")

</div>

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