# Problem Copyping data from one index to other

**URL:** https://discuss.elastic.co/t/problem-copyping-data-from-one-index-to-other/94653
**Category:** Elasticsearch
**Created:** [July 26, 2017, 2:15pm UTC](https://discuss.elastic.co/t/problem-copyping-data-from-one-index-to-other/94653 "2017-07-26T14:15:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![swatititame](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@swatititame](https://discuss.elastic.co/u/swatititame)
#### Post date: [July 26, 2017, 2:15pm UTC](https://discuss.elastic.co/t/problem-copyping-data-from-one-index-to-other/94653/1 "2017-07-26T14:15:05Z")

</div>

Hi,  
I am trying to copy data from source index(sap-trace-app-logs-k8p) to target index k8pindex but I can't see all the data in kibana.I can see only few records.Please let me know what is wrong here.  
In my source index I have 23 fields and my target index i have only 8 fields  
**logstah conf file:**

> input {  
> elasticsearch {  
> hosts =\> ["10.103.20.64:9200"]  
> index =\> "sap-trace-app-logs-k8p"  
> size =\> 1000  
> scroll =\> "5m"  
> docinfo =\> true  
> }  
> }  
> filter {  
> mutate {  
> remove\_field =\> ["prd\_m1","prd\_m4","prd\_m6","prd\_m2","prd\_m5","prd\_Timezone","prd\_CustomerMessageComponent","prd\_LogID","prd\_CorrelationID","prd\_Location","prd\_Session","prd\_PassportSession","prd\_PassportUserActivityID","prd\_PassportConnection","prd\_PassportConnectionCounter","prd\_Thread"]  
> }  
> }  
> output {  
> elasticsearch {  
> hosts =\> ["10.103.20.64:9200"]  
> manage\_template =\> false  
> index =\> "k8pindex"  
> document\_id =\> "%{id}"  
> workers =\> 1  
> }  
> }

Source index schema

> {  
> "sap-trace-app-logs-k8p": {  
> "aliases": {},  
> "mappings": {  
> "trc-prd": {  
> "properties": {  
> "@timestamp": {  
> "type": "date",  
> "format": "strict\_date\_optional\_time||epoch\_millis"  
> },  
> "@version": {  
> "type": "string"  
> },  
> "beat": {  
> "properties": {  
> "hostname": {  
> "type": "string"  
> },  
> "name": {  
> "type": "string"  
> },  
> "version": {  
> "type": "string"  
> }  
> }  
> },  
> "host": {  
> "type": "string"  
> },  
> "input\_type": {  
> "type": "string"  
> },  
> "message": {  
> "type": "string"  
> },  
> "offset": {  
> "type": "long"  
> },  
> "prd\_Application": {  
> "type": "string"  
> },  
> "prd\_Category": {  
> "type": "string"  
> },  
> "prd\_CorrelationID": {  
> "type": "string"  
> },  
> "prd\_CustomerMessageComponent": {  
> "type": "string"  
> },  
> "prd\_DateTime": {  
> "type": "date",  
> "format": "strict\_date\_optional\_time||epoch\_millis"  
> },  
> "prd\_ErrorMessage": {  
> "type": "string"  
> },  
> "prd\_Location": {  
> "type": "string"  
> },  
> "prd\_LogID": {  
> "type": "string"  
> },  
> "prd\_PassportConnection": {  
> "type": "string"  
> },  
> "prd\_PassportConnectionCounter": {  
> "type": "string"  
> },  
> "prd\_PassportSession": {  
> "type": "string"  
> },  
> "prd\_PassportUserActivityID": {  
> "type": "string"  
> },  
> "prd\_RuntimeComponent": {  
> "type": "string"  
> },  
> "prd\_Session": {  
> "type": "string"  
> },  
> "prd\_Severity": {  
> "type": "string"  
> },  
> "prd\_Thread": {  
> "type": "string"  
> },  
> "prd\_Timezone": {  
> "type": "string"  
> },  
> "prd\_User": {  
> "type": "string"  
> },  
> "prd\_m2": {  
> "type": "string"  
> },  
> "prd\_m5": {  
> "type": "string"  
> },  
> "prd\_trace\_m5": {  
> "type": "string"  
> },  
> "source": {  
> "type": "string"  
> },  
> "tags": {  
> "type": "string"  
> },  
> "type": {  
> "type": "string"  
> }  
> }  
> },  
> "appl-prd": {  
> "properties": {  
> "@timestamp": {  
> "type": "date",  
> "format": "strict\_date\_optional\_time||epoch\_millis"  
> },  
> "@version": {  
> "type": "string"  
> },  
> "beat": {  
> "properties": {  
> "hostname": {  
> "type": "string"  
> },  
> "name": {  
> "type": "string"  
> },  
> "version": {  
> "type": "string"  
> }  
> }  
> },  
> "host": {  
> "type": "string"  
> },  
> "input\_type": {  
> "type": "string"  
> },  
> "message": {  
> "type": "string"  
> },  
> "offset": {  
> "type": "long"  
> },  
> "prd\_Application": {  
> "type": "string"  
> },  
> "prd\_Category": {  
> "type": "string"  
> },  
> "prd\_CorrelationID": {  
> "type": "string"  
> },  
> "prd\_CustomerMessageComponent": {  
> "type": "string"  
> },  
> "prd\_DateTime": {  
> "type": "date",  
> "format": "strict\_date\_optional\_time||epoch\_millis"  
> },  
> "prd\_ErrorMessage": {  
> "type": "string"  
> },  
> "prd\_Location": {  
> "type": "string"  
> },  
> "prd\_LogID": {  
> "type": "string"  
> },  
> "prd\_PassportConnection": {  
> "type": "string"  
> },  
> "prd\_PassportConnectionCounter": {  
> "type": "string"  
> },  
> "prd\_PassportSession": {  
> "type": "string"  
> },  
> "prd\_PassportUserActivityID": {  
> "type": "string"  
> },  
> "prd\_RuntimeComponent": {  
> "type": "string"  
> },  
> "prd\_Session": {  
> "type": "string"  
> },  
> "prd\_Severity": {  
> "type": "string"  
> },  
> "prd\_Thread": {  
> "type": "string"  
> },  
> "prd\_Timezone": {  
> "type": "string"  
> },  
> "prd\_User": {  
> "type": "string"  
> },  
> "prd\_trace\_m5": {  
> "type": "string"  
> },  
> "source": {  
> "type": "string"  
> },  
> "tags": {  
> "type": "string"  
> },  
> "type": {  
> "type": "string"  
> }  
> }  
> }  
> },  
> "settings": {  
> "index": {  
> "creation\_date": "1500534695122",  
> "number\_of\_shards": "5",  
> "number\_of\_replicas": "1",  
> "uuid": "bfL8A49AQZq78vHAVy4rlQ",  
> "version": {  
> "created": "2030599"  
> }  
> }  
> },  
> "warmers": {}  
> }  
> }

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [July 27, 2017, 12:28am UTC](https://discuss.elastic.co/t/problem-copyping-data-from-one-index-to-other/94653/2 "2017-07-27T00:28:20Z")

</div>

You're removing a number of fields there, some of which appear in the original index.

---

<div class="post-metadata">

### Author: ![swatititame](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@swatititame](https://discuss.elastic.co/u/swatititame)
#### Post date: [July 27, 2017, 6:52am UTC](https://discuss.elastic.co/t/problem-copyping-data-from-one-index-to-other/94653/3 "2017-07-27T06:52:41Z")

</div>

yes ,My target index contains only 8 fields.I want to copy 8 fields out of 23 for optimization.If i keep all this 23 field my dashboard will not load.

> {  
> "k8pindex": {  
> "aliases": {},  
> "mappings": {  
> "appl-prd": {  
> "properties": {  
> "@timestamp": {  
> "type": "date",  
> "format": "strict\_date\_optional\_time||epoch\_millis"  
> },  
> "@version": {  
> "type": "string"  
> },  
> "beat": {  
> "properties": {  
> "hostname": {  
> "type": "string"  
> },  
> "name": {  
> "type": "string"  
> },  
> "version": {  
> "type": "string"  
> }  
> }  
> },  
> "host": {  
> "type": "string"  
> },  
> "input\_type": {  
> "type": "string"  
> },  
> "message": {  
> "type": "string"  
> },  
> "offset": {  
> "type": "long"  
> },  
> "prd\_Application": {  
> "type": "string"  
> },  
> "prd\_Category": {  
> "type": "string"  
> },  
> "prd\_DateTime": {  
> "type": "date",  
> "format": "strict\_date\_optional\_time||epoch\_millis"  
> },  
> "prd\_ErrorMessage": {  
> "type": "string"  
> },  
> "prd\_RuntimeComponent": {  
> "type": "string"  
> },  
> "prd\_Severity": {  
> "type": "string"  
> },  
> "prd\_User": {  
> "type": "string"  
> },  
> "prd\_trace\_m5": {  
> "type": "string"  
> },  
> "source": {  
> "type": "string"  
> },  
> "tags": {  
> "type": "string"  
> },  
> "type": {  
> "type": "string"  
> }  
> }  
> },  
> "trc-prd": {  
> "properties": {  
> "@timestamp": {  
> "type": "date",  
> "format": "strict\_date\_optional\_time||epoch\_millis"  
> },  
> "@version": {  
> "type": "string"  
> },  
> "beat": {  
> "properties": {  
> "hostname": {  
> "type": "string"  
> },  
> "name": {  
> "type": "string"  
> },  
> "version": {  
> "type": "string"  
> }  
> }  
> },  
> "host": {  
> "type": "string"  
> },  
> "input\_type": {  
> "type": "string"  
> },  
> "message": {  
> "type": "string"  
> },  
> "offset": {  
> "type": "long"  
> },  
> "prd\_Application": {  
> "type": "string"  
> },  
> "prd\_Category": {  
> "type": "string"  
> },  
> "prd\_DateTime": {  
> "type": "date",  
> "format": "strict\_date\_optional\_time||epoch\_millis"  
> },  
> "prd\_ErrorMessage": {  
> "type": "string"  
> },  
> "prd\_RuntimeComponent": {  
> "type": "string"  
> },  
> "prd\_Severity": {  
> "type": "string"  
> },  
> "prd\_User": {  
> "type": "string"  
> },  
> "prd\_trace\_m5": {  
> "type": "string"  
> },  
> "source": {  
> "type": "string"  
> },  
> "tags": {  
> "type": "string"  
> },  
> "type": {  
> "type": "string"  
> }  
> }  
> }  
> },  
> "settings": {  
> "index": {  
> "creation\_date": "1501069213488",  
> "k8pindex": {  
> "settings": {  
> "index": {  
> "creation\_date": "1499684605213",  
> "number\_of\_shards": "5",  
> "number\_of\_replicas": "1",  
> "uuid": "LLKEh-DYRDmSOeEhycfJLw",  
> "version": {  
> "created": "2030599"  
> }  
> }  
> },  
> "mappings": {  
> "appl-prd": {  
> "properties": {  
> "prd\_DateTime": {  
> "format": "strict\_date\_optional\_time||epoch\_millis",  
> "type": "date"  
> },  
> "offset": {  
> "type": "long"  
> },  
> "prd\_Severity": {  
> "type": "string",  
> "index": "not\_analyzed"  
> },  
> "input\_type": {  
> "type": "string"  
> },  
> "source": {  
> "type": "string"  
> },  
> "message": {  
> "type": "string"  
> },  
> "type": {  
> "type": "string"  
> },  
> "tags": {  
> "type": "string"  
> },  
> "@timestamp": {  
> "format": "strict\_date\_optional\_time||epoch\_millis",  
> "type": "date"  
> },  
> "prd\_RuntimeComponent": {  
> "type": "string",  
> "index": "not\_analyzed"  
> },  
> "prd\_ErrorMessage": {  
> "ignore\_above": "10922",  
> "type": "string",  
> "index": "not\_analyzed"  
> },  
> "@version": {  
> "type": "string"  
> },  
> "beat": {  
> "properties": {  
> "name": {  
> "type": "string"  
> },  
> "version": {  
> "type": "string"  
> },  
> "hostname": {  
> "type": "string"  
> }  
> }  
> },  
> "host": {  
> "type": "string"  
> },  
> "prd\_Application": {  
> "type": "string",  
> "index": "not\_analyzed"  
> },  
> "prd\_Category": {  
> "type": "string",  
> "index": "not\_analyzed"  
> },  
> "prd\_User": {  
> "type": "string",  
> "index": "not\_analyzed"  
> }  
> }  
> },
> 
> ```
> "number_of_shards": "5",
> "number_of_replicas": "1",
> "uuid": "ISEbSo8zRmKI1ulbOwtkIg",
> "version": {
> "created": "2030599"
> }
> }
> },
> "warmers": {}
> 
> ```
> 
> }  
> }

---

<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: [August 24, 2017, 6:53am UTC](https://discuss.elastic.co/t/problem-copyping-data-from-one-index-to-other/94653/4 "2017-08-24T06:53:36Z")

</div>

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