# Nesting Ingested CSV data into a single document

**URL:** https://discuss.elastic.co/t/nesting-ingested-csv-data-into-a-single-document/117147
**Category:** Elasticsearch
**Created:** [January 26, 2018, 5:22am UTC](https://discuss.elastic.co/t/nesting-ingested-csv-data-into-a-single-document/117147 "2018-01-26T05:22:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![george\_assan](https://avatars.discourse-cdn.com/v4/letter/g/c37758/32.png) [@george\_assan](https://discuss.elastic.co/u/george_assan)
#### Post date: [January 26, 2018, 5:22am UTC](https://discuss.elastic.co/t/nesting-ingested-csv-data-into-a-single-document/117147/1 "2018-01-26T05:22:14Z")

</div>

I am building webapp that allows users to search for charts and data. I have a number of csv files to be ingested. Each file contains data that will be processed and visualized as a chart on the front end of my web app. Basically each csv file represents a chart.

I was going to store metadata on each chart (title, tags, industry etc) into a document and nest the generated documents from the csv in it. So basically a nested object with the parent document having searchable fields (title, tags, industry) and the nested column data from the CSV.

First of all is this a good idea? Can it be done more efficiently and what do you suggest?  
Secondly if this is not a bad idea, how do I use logstash to ingest the csv files as nested docs in this parent document?

---

<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: [February 23, 2018, 5:22am UTC](https://discuss.elastic.co/t/nesting-ingested-csv-data-into-a-single-document/117147/2 "2018-02-23T05:22:16Z")

</div>

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