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?