yesIcan
yesIcan

Reputation: 1701

ElasticSearch aggregation returns always 10 buckets only

I am using NEST. The number of buckets returned from ElasticSearch aggregation is always 10 (default value), in spite of the fact that the size is set to 10000 enter image description here

Upvotes: 0

Views: 319

Answers (1)

Val
Val

Reputation: 217304

You need to set the size inside the Terms aggregation and not outside of it. Try this:

.Aggregations( a => a
   .Terms(category_agg", st => st
       .Field(o => o.categories.Select(x => x.id))
       .Size(10000)
   )
)

Upvotes: 3

Related Questions