# Is there a way to copy a subset of data from one elasticsearch index to another?

**URL:** https://discuss.elastic.co/t/is-there-a-way-to-copy-a-subset-of-data-from-one-elasticsearch-index-to-another/23590
**Category:** Elasticsearch
**Created:** [May 8, 2015, 9:28pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-copy-a-subset-of-data-from-one-elasticsearch-index-to-another/23590 "2015-05-08T21:28:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Gerald\_DeConto](https://avatars.discourse-cdn.com/v4/letter/g/cc9497/32.png) [@Gerald\_DeConto](https://discuss.elastic.co/u/Gerald_DeConto)
#### Post date: [May 8, 2015, 9:28pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-copy-a-subset-of-data-from-one-elasticsearch-index-to-another/23590/1 "2015-05-08T21:28:32Z")

</div>

hi all

I am looking for a way to copy a subset of data (this could mean only some  
documents, or only some fields from the documents) from one elasticsearch  
index to another in the same cluster

Scenario: I have a potentially very large index (with billions of  
documents). I need the fine details for a period of time, but after that  
period it would be useful to only have a subset of the data (filtered by  
some criteria or only returning certain fields) so that our indexes dont  
become needlessly bloated with less useful data.

In this situation, I don't think that we can use date-based indexes (ie  
mydata-2015-05030) as the data doesnt really have a specific date to use.

I do see that there's a couple of java/node based tools, and a plugin named  
knapsack ([https://github.com/jprante/elasticsearch-knapsack](https://github.com/jprante/elasticsearch-knapsack)). Hard to tell  
from the docs if they can do what I am trying to do.

Has anyone had to deal with situation, copying a subset of data from one  
index/cluster to a new index/cluster? If so, what are you using??

Thanks in advance for any help

## -- Please update your bookmarks! We moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2858762a-c527-4297-ad35-0b1f6938ba99%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2858762a-c527-4297-ad35-0b1f6938ba99%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [July 6, 2017, 12:14am UTC](https://discuss.elastic.co/t/is-there-a-way-to-copy-a-subset-of-data-from-one-elasticsearch-index-to-another/23590/2 "2017-07-06T00:14:58Z")

</div>


