# Are buckets persistent?

**URL:** <https://discuss.elastic.co/t/are-buckets-persistent/143780>\
**Category:** Elasticsearch\
**Created:** [August 10, 2018, 12:13am UTC](https://discuss.elastic.co/t/are-buckets-persistent/143780 "2018-08-10T00:13:03Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Jose\_Ramierez](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jose\_Ramierez](https://discuss.elastic.co/u/Jose_Ramierez)\
**Post date:** [August 12, 2018, 9:13pm UTC](https://discuss.elastic.co/t/are-buckets-persistent/143780/5 "2018-08-12T21:13:00Z")

</div>

David,

Can you help me reconcile this thread, with what we discussed here:

> [@Are contents of a bucket held in the same shard?](https://discuss.elastic.co/t/are-contents-of-a-bucket-held-in-the-same-shard/141059):
>
> We are evaluating using buckets to keep data by user account in a single bucket (e.g. the bucket becomes the "accountid" container, holding all documents for that account) The question has arisen: If we have a 20 or 100 shard index, will a given bucket always be kept within a single shard? If not, how many shards will it span?

On that thread, it sounded like I could define a bucket up front (for a given account), and then documents added to that bucket would be held together on a single shard.

Please help me understand all the way.

Thanks!

---

_[View the full topic](https://discuss.elastic.co/t/are-buckets-persistent/143780)._
