Jigish Thakar
Jigish Thakar

Reputation: 147

Elasticsearch: pagination on unique values

I am building some Logging and monitoring product for my employer and using ES as backend. now finding unique value of each/any attribute is core part of business logic I have in hand.

let's say I want unique dst_ip, to achieve that,

here 1116 is received from first API. now here the count is very small but in production environment this count goes greater than 2 thousand . which results in slow query response.

do we have any other way to fetch such values with pagination in built like we have in search query with size and from?

Upvotes: 1

Views: 965

Answers (1)

Anton
Anton

Reputation: 4611

Elasticsearch does not support pagination for aggregation results, only for the documents themselves. If you want to return all aggregation results, set "size": 0.

Upvotes: 1

Related Questions