# Highlighting using words from another field

**URL:** https://discuss.elastic.co/t/highlighting-using-words-from-another-field/311444
**Category:** Elasticsearch
**Created:** [August 4, 2022, 2:52pm UTC](https://discuss.elastic.co/t/highlighting-using-words-from-another-field/311444 "2022-08-04T14:52:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![stobyer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stobyer/32/109236_2.png) [@stobyer](https://discuss.elastic.co/u/stobyer)
#### Post date: [August 4, 2022, 2:52pm UTC](https://discuss.elastic.co/t/highlighting-using-words-from-another-field/311444/1 "2022-08-04T14:52:12Z")

</div>

Hello,  
I'm trying to highlight text using words from other field. What do I mean?  
I have a documents similar to the following:

```auto
{
 property: 1,
 content: "a lot of animals including cats and dogs",
 keywords: ["cat", "dog"]
},
{
 property: 1,
 content: "A lions and zebras are leaving in Africa",
 keywords: ["zebra", "lion"]
}

```

I'm searching by `property` field, but I want the `content` to be highlighted using query built from `keywords`  
Is it possible?  
Thanks!

---

<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: [September 1, 2022, 2:53pm UTC](https://discuss.elastic.co/t/highlighting-using-words-from-another-field/311444/2 "2022-09-01T14:53:06Z")

</div>

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