we are using elastic 5.6.2. In this version, how we do the term aggregation for nested objetcs with limit and offset? Please advice..
We have tried this query
{
"index": "sample_mastercollection",
"type": "collectionsform",
"body": {
"size": 0,
"query": {
"bool": {
"must": [
{
"match": {
"masterid": "2_266247426322"
}
},
{
"match": {
"visibility": "yes"
}
},
{
"nested": {
"path": "collectedform",
"query": [
{
"bool": {
"must": [
{
"match_phrase": {
"collectedform.masterid": "7357841"
}
}
]
}
}
]
}
}
]
}
},
"aggs": {
"formfilter": {
"nested": {
"path": "collectedform"
},
"aggs": {
"filter_types": {
"filter": {
"bool": {
"must": [
{
"match": {
"collectedform.masterid": "7357841"
}
}
],
"must_not": [
{
"match": {
"collectedform.value.value.raw": ""
}
}
]
}
},
"aggs": {
"_filter": {
"terms": {
"size": 100,
"field": "collectedform.value.value.raw"
}
}
}
}
}
}
}
}
}