# Update dataset import to use bulk api now all the documents are nested under a doc field

**URL:** https://discuss.elastic.co/t/update-dataset-import-to-use-bulk-api-now-all-the-documents-are-nested-under-a-doc-field/18353
**Category:** Elasticsearch
**Created:** [June 26, 2014, 2:47pm UTC](https://discuss.elastic.co/t/update-dataset-import-to-use-bulk-api-now-all-the-documents-are-nested-under-a-doc-field/18353 "2014-06-26T14:47:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![TealFawn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tealfawn/32/44845_2.png) [@TealFawn](https://discuss.elastic.co/u/TealFawn)
#### Post date: [June 26, 2014, 2:47pm UTC](https://discuss.elastic.co/t/update-dataset-import-to-use-bulk-api-now-all-the-documents-are-nested-under-a-doc-field/18353/1 "2014-06-26T14:47:47Z")

</div>

I switched up my importing of a csv file from doing single inserts to a  
bulk insert but I'm not sure why all my document are nested in a doc field  
instead of inserted as value. There is no 'doc' field in the dataset so I'm  
not sure where that value is coming from.  
ie:

"hits": [  
{  
"\_index": "sample-index",  
"\_type": "sample\_agg1\_v3",  
"\_id": "75a6c925-d37e-49fd-b1ca-3c5355e2d146",  
"\_score": 1,  
"\_source": {  
"doc": "{' ............. the data

instead of

"hits": [  
{  
"\_index": "sample-index",  
"\_type": "agg1\_sample",  
"\_id": "83abd750-54d9-4373-8710-5eff29485c9e",  
"\_score": 1,  
"\_source": { .... the data

--  
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/b5120d5f-083b-407f-8571-db3328be3621%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b5120d5f-083b-407f-8571-db3328be3621%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, 1:19am UTC](https://discuss.elastic.co/t/update-dataset-import-to-use-bulk-api-now-all-the-documents-are-nested-under-a-doc-field/18353/2 "2017-07-06T01:19:28Z")

</div>


