# Highlighting on nested objects

**URL:** https://discuss.elastic.co/t/highlighting-on-nested-objects/11020
**Category:** Elasticsearch
**Created:** [March 5, 2013, 5:29pm UTC](https://discuss.elastic.co/t/highlighting-on-nested-objects/11020 "2013-03-05T17:29:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Samuel\_Molnar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samuel_molnar/32/2253_2.png) [@Samuel\_Molnar](https://discuss.elastic.co/u/Samuel_Molnar)
#### Post date: [March 5, 2013, 5:29pm UTC](https://discuss.elastic.co/t/highlighting-on-nested-objects/11020/1 "2013-03-05T17:29:45Z")

</div>

Hi. I have a question about highlighting nested object fields.

Consider record like this:  
{

- \_source: {
  - id: 286
  - translations: [
    - {
      - id: 568
      - language: 'lang1'
      - value: 'foo1 bar1'  
}

    - {
      - id: 569
      - language: 'lang2'
      - value: 'foo2 bar2'.  
}  
]  
}

}

If the translations.value has ngram filter, is it possible to highlight  
matches in nested object such as this one?  
And how would the highlight query look like.

Thanks a lot for response.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Manoj\_Mohan\_2](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@Manoj\_Mohan\_2](https://discuss.elastic.co/u/Manoj_Mohan_2)
#### Post date: [August 7, 2013, 7:53am UTC](https://discuss.elastic.co/t/highlighting-on-nested-objects/11020/2 "2013-08-07T07:53:55Z")

</div>

Bumping up this thread. I have a similar problem without the ngram filter.

- Can anybody confirm if highlighting is possible for nested objects using  
nested queries ... ?\*

On Tuesday, March 5, 2013 10:59:45 PM UTC+5:30, Samuel Molnar wrote:

> Hi. I have a question about highlighting nested object fields.
> 
> Consider record like this:  
> {
> 
> - \_source: {
> - id: 286
> - translations: [
> - {
> - id: 568
> - language: 'lang1'
> - value: 'foo1 bar1'  
> }
> 
> - {
> - id: 569
> - language: 'lang2'
> - value: 'foo2 bar2'.  
> }  
> ]  
> }
> 
> }
> 
> If the translations.value has ngram filter, is it possible to highlight  
> matches in nested object such as this one?  
> And how would the highlight query look like.
> 
> Thanks a lot for response.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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: [July 6, 2017, 2:22am UTC](https://discuss.elastic.co/t/highlighting-on-nested-objects/11020/3 "2017-07-06T02:22:31Z")

</div>


