# Child - top hit aggregation highlights not working

**URL:** https://discuss.elastic.co/t/child-top-hit-aggregation-highlights-not-working/76979
**Category:** Elasticsearch
**Created:** [March 1, 2017, 12:32pm UTC](https://discuss.elastic.co/t/child-top-hit-aggregation-highlights-not-working/76979 "2017-03-01T12:32:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dpalaka](https://avatars.discourse-cdn.com/v4/letter/d/919ad9/32.png) [@dpalaka](https://discuss.elastic.co/u/dpalaka)
#### Post date: [March 1, 2017, 12:32pm UTC](https://discuss.elastic.co/t/child-top-hit-aggregation-highlights-not-working/76979/1 "2017-03-01T12:32:49Z")

</div>

Hi all,  
I have used highlights in top hits aggregation successfully, but when I try it in a child-top hit aggregation it doesn't work. This is how my aggregation looks like:

* * *

```
"aggregations":{"group1" : {
  "terms" : {
    "field" : "property_1",
    "size" : 2
  },
 "aggregations" : {
    "group2" : {
      "terms" : {
        "field" : "property_2",
        "size" : 2
      },
      "aggregations" : {
        "child_group" : {
          "children" : {
            "type" : "child_type"
          },
          "aggregations" : {
            "children_filter" : {
              "filter" : {
                "bool" : {
                  "should" : [ {
                    "query_string" : {
                      "query" : "foo",
                      "default_field" : "value",
                      "allow_leading_wildcard" : true,
                      "lowercase_expanded_terms" : false
                    }
                  }, {
                    "query_string" : {
                      "query" : "foo",
                      "default_field" : "content",
                      "allow_leading_wildcard" : true,
                      "lowercase_expanded_terms" : false
                    }
                  } ],
                  "minimum_should_match" : "1"
                }
              },
              "aggregations" : {
                "top_hits1" : {
                  "top_hits" : {
                    "size" : 2,
                    "highlight" : {
                      "pre_tags" : ["<strong>"],
                      "post_tags" : ["</strong>"],
                      "fields" : {
                        "value" : {
                          "fragment_size" : 100,
                          "number_of_fragments" : 2,
                          "type" : "fvh",
                          "matched_fields" : ["value"]
                        },
                         "content" : {
                          "fragment_size" : 100,
                          "number_of_fragments" : 2,
                          "type" : "fvh",
                          "matched_fields" : ["content"]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

```

Any suggestions?

---

<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 29, 2017, 12:32pm UTC](https://discuss.elastic.co/t/child-top-hit-aggregation-highlights-not-working/76979/2 "2017-03-29T12:32:52Z")

</div>

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