# Clarification - ingesting documents using logstash into an existing index

**URL:** <https://discuss.elastic.co/t/clarification-ingesting-documents-using-logstash-into-an-existing-index/123662>\
**Category:** Logstash\
**Created:** [March 13, 2018, 1:27am UTC](https://discuss.elastic.co/t/clarification-ingesting-documents-using-logstash-into-an-existing-index/123662 "2018-03-13T01:27:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_smith](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jason\_smith](https://discuss.elastic.co/u/jason_smith)\
**Post date:** [March 13, 2018, 1:27am UTC](https://discuss.elastic.co/t/clarification-ingesting-documents-using-logstash-into-an-existing-index/123662/1 "2018-03-13T01:27:14Z")

</div>

Hello folks,

I want to create the index structure and ingest documents into that structure using logstash.  
In the pipeline config file in the attachement, where should I specify the name of structure into which this data should be ingested into? In the output section?

I created the index structure as follows:

```
 PUT /animals 
{
  "settings": 
  {
    "number_of_shards": 2,
    "number_of_replicas": 2
  },
   "mappings": 
   {
     
   }
  
}

PUT /animals/_mapping/doc
{
  "properties": {
    "animal-type":
    {
       "type": "text"
    },
    "name": 
    {
       "type": "text",
       "analyzer": "standard"
    },
    "legs":
    {
      "type": "integer"
      
    },
    "tail":
    {
      "type": "boolean"
    },
    "eating-type":
    {
      "type": "text"
    }
  }
}

```

 ![2018-03-12_18-26-27](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9d4d7bf7c4dc82fa24876fd43d73052dca957f8c.jpg)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 13, 2018, 7:09am UTC](https://discuss.elastic.co/t/clarification-ingesting-documents-using-logstash-into-an-existing-index/123662/2 "2018-03-13T07:09:06Z")

</div>

You've created an "animals" index with predefined mappings for various features of animal species, but your Logstash configuration reads a CSV file with car data. This doesn't make any sense.

---

<div class="post-metadata">

**Author:** ![jason\_smith](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jason\_smith](https://discuss.elastic.co/u/jason_smith)\
**Post date:** [March 13, 2018, 3:14pm UTC](https://discuss.elastic.co/t/clarification-ingesting-documents-using-logstash-into-an-existing-index/123662/3 "2018-03-13T15:14:43Z")

</div>

sorry. I uploaded a wrong logstash file.

 ![2018-03-13_8-12-08](https://us1.discourse-cdn.com/elastic/original/3X/c/d/cda7bb68c292037d6c5f599621caf6b558e498c0.jpg)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 13, 2018, 6:51pm UTC](https://discuss.elastic.co/t/clarification-ingesting-documents-using-logstash-into-an-existing-index/123662/4 "2018-03-13T18:51:22Z")

</div>

Okay. Well, yes, the elasticsearch output controls which ES host to connect to and into which index to put the data. What each event looks like is determined by the inputs and filters you have.

---

<div class="post-metadata">

**Author:** ![jason\_smith](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@jason\_smith](https://discuss.elastic.co/u/jason_smith)\
**Post date:** [March 13, 2018, 7:05pm UTC](https://discuss.elastic.co/t/clarification-ingesting-documents-using-logstash-into-an-existing-index/123662/5 "2018-03-13T19:05:39Z")

</div>

thank you

---

<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:** [April 10, 2018, 7:06pm UTC](https://discuss.elastic.co/t/clarification-ingesting-documents-using-logstash-into-an-existing-index/123662/6 "2018-04-10T19:06:14Z")

</div>

Closed on April 10, 2018, 7:06pm UTC

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