# '\_all' vs 'copy\_to' space variation

**URL:** <https://discuss.elastic.co/t/-all-vs-copy-to-space-variation/40192>\
**Category:** Elasticsearch\
**Created:** [January 27, 2016, 6:44am UTC](https://discuss.elastic.co/t/-all-vs-copy-to-space-variation/40192 "2016-01-27T06:44:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anusha6](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@anusha6](https://discuss.elastic.co/u/anusha6)\
**Post date:** [January 27, 2016, 6:44am UTC](https://discuss.elastic.co/t/-all-vs-copy-to-space-variation/40192/1 "2016-01-27T06:44:11Z")

</div>

Hello Team,  
I am using '\_all' for to group different fields data together, in which when I load data it is occupying disk space 3 times i.e., without using '\_all' to hold different field data init it my index took 5mb space after data loaded init,

If I use the '\_all' mappings as shown..  
"\_all": {  
"index\_analyzer": "wordAnalyzer",  
"search\_analyzer": "whitespace\_analyzer"  
},  
"properties": {  
"Engine": {  
"type": "string",  
"index": "not\_analyzed",  
"fields": {  
"raw": {  
"type": "string"  
}  
}  
},  
"EngineCode": {  
"type": "string",  
"include\_in\_all": false  
},  
"Make": {  
"type": "string",  
"index": "not\_analyzed",  
"fields": {  
"raw": {  
"type": "string"  
}  
}  
},  
"MakeCode": {  
"type": "string",  
"include\_in\_all": false  
},  
"Model": {  
"type": "string",  
"index": "not\_analyzed",  
"norms": {  
"enabled": true  
},  
"fields": {  
"raw": {  
"type": "string"  
}  
}  
},  
"ModelCode": {  
"type": "string",  
"include\_in\_all": false  
},  
"ShortYear": {  
"type": "string",  
"index": "not\_analyzed",  
},  
"Year": {  
"type": "string",  
"index": "not\_analyzed",  
"fields": {  
"raw": {  
"type": "string",  
"index": "not\_analyzed"  
}  
}  
},  
"YearCode": {  
"type": "string",  
"include\_in\_all": false  
}  
}  
}

When I load data occupying 25 mb sapce..

I have tried with 'copy\_to' field then it is occupying 15mb space and the settings with 'copy\_to' as shown:  
"demoymme\_type": {  
"properties": {  
"Engine": {  
"type": "string",  
"index": "not\_analyzed",  
"fields": {  
"raw": {  
"type": "string"  
}  
},  
"copy\_to": [  
"full\_name"  
]  
},  
"EngineCode": {  
"type": "string"  
},  
"Make": {  
"type": "string",  
"index": "not\_analyzed",  
"fields": {  
"raw": {  
"type": "string"  
}  
},  
"copy\_to": [  
"full\_name"  
]  
},  
"MakeCode": {  
"type": "string"  
},  
"Model": {  
"type": "string",  
"index": "not\_analyzed",  
"fields": {  
"raw": {  
"type": "string"  
}  
},  
"copy\_to": [  
"full\_name"  
]  
},  
"ModelCode": {  
"type": "string"  
},  
"ShortYear": {  
"type": "string",  
"index": "not\_analyzed",  
},  
"Year": {  
"type": "string",  
"index": "not\_analyzed",  
"norms": {  
"enabled": true  
},  
"fields": {  
"raw": {  
"type": "string",  
"index": "not\_analyzed"  
}  
},  
"copy\_to": [  
"full\_name"  
]  
},  
"YearCode": {  
"type": "string"  
},  
"full\_name": {  
"type": "string",  
"index\_analyzer": "wordAnalyzer",  
"search\_analyzer": "whitespace\_analyzer"  
}  
}  
}  
May I know the difference b/w '\_all' and 'copy\_to'??

---

<div class="post-metadata">

**Author:** ![anusha6](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@anusha6](https://discuss.elastic.co/u/anusha6)\
**Post date:** [January 27, 2016, 6:45am UTC](https://discuss.elastic.co/t/-all-vs-copy-to-space-variation/40192/2 "2016-01-27T06:45:55Z")

</div>

And I would like to know which one is the best approach to combine different field data into one field and search on it????

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 27, 2016, 7:10am UTC](https://discuss.elastic.co/t/-all-vs-copy-to-space-variation/40192/3 "2016-01-27T07:10:11Z")

</div>

Use copy\_to! And disable \_all

Definitely better. You'll have a better control.

---

<div class="post-metadata">

**Author:** ![anusha6](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@anusha6](https://discuss.elastic.co/u/anusha6)\
**Post date:** [January 27, 2016, 7:10am UTC](https://discuss.elastic.co/t/-all-vs-copy-to-space-variation/40192/4 "2016-01-27T07:10:59Z")

</div>

Thanks David 🙂

---

<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 5, 2017, 11:21pm UTC](https://discuss.elastic.co/t/-all-vs-copy-to-space-variation/40192/5 "2017-07-05T23:21:12Z")

</div>


