# Sample an index

**URL:** <https://discuss.elastic.co/t/sample-an-index/101406>\
**Category:** Elasticsearch\
**Created:** [September 22, 2017, 12:09am UTC](https://discuss.elastic.co/t/sample-an-index/101406 "2017-09-22T00:09:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikstephens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/erikstephens/32/5430_2.png) [@erikstephens](https://discuss.elastic.co/u/erikstephens)\
**Post date:** [September 22, 2017, 12:09am UTC](https://discuss.elastic.co/t/sample-an-index/101406/1 "2017-09-22T00:09:09Z")

</div>

For performance reasons, I'd like only a sample of matching documents of a large index. The [Sampler Aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-aggregations-bucket-sampler-aggregation.html) looks promising but I'm worried my use case does not quite fit. For example, I expect I'll need to scroll the results which could still be quite large. Maybe the plugin route is the way to go but I don't see any example query-time plugins. There such a way to accomplish this now? If not, does it sound possible to do via an elasticsearch plugin ( assume I'm a java & lucene guru 😛 )? Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 20, 2017, 12:09am UTC](https://discuss.elastic.co/t/sample-an-index/101406/2 "2017-10-20T00:09:11Z")

</div>

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