How to use term aggregation with search and pagination?

Is it possible to use pagination in term aggregation query with a search term?
I need to paginate the result of the following query I am not able to find any solution ?

{
	"sort": [{
		"create_date": {
			"order": "desc"
		}
	}],
	"query": {
		"bool": {
			"must": []
		}
	},
	"aggs": {
		"genres": {
			"terms": {
				"field": "mentions.keyword",
				"include": "insta.*"
			}
		}
	}
}

You probably need thecomposite aggregation

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