# Parent/child with Elasticsearch 2.0 and Logstash 2.0

**URL:** <https://discuss.elastic.co/t/parent-child-with-elasticsearch-2-0-and-logstash-2-0/34057>\
**Category:** Logstash\
**Created:** [November 6, 2015, 9:33pm UTC](https://discuss.elastic.co/t/parent-child-with-elasticsearch-2-0-and-logstash-2-0/34057 "2015-11-06T21:33:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fchantrel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fchantrel/32/6204_2.png) [@fchantrel](https://discuss.elastic.co/u/fchantrel)\
**Post date:** [November 6, 2015, 9:33pm UTC](https://discuss.elastic.co/t/parent-child-with-elasticsearch-2-0-and-logstash-2-0/34057/1 "2015-11-06T21:33:38Z")

</div>

Hi,  
before I had everything working fine with elasticsearch 1.6 and logstash 1.5.4 but now I'm trying to update to elasticsearch 2.0 and logstash 2.0 and I can't make it work.  
Can somebody tell me what is wrong in my configurations please ?

Thanks.  
Frédéric.

Here is my mapping :  
"myindexv3": {  
"mappings": {  
"mychild": {  
"\_all": {  
"enabled": false  
},  
"\_parent": {  
"type": "myparent"  
},  
"\_routing": {  
"required": true  
},  
"properties": {  
"enddate": {  
"type": "date",  
"format": "dateOptionalTime"  
},  
"goals": {  
"type": "long",  
"null\_value": 0  
},  
"startdate": {  
"type": "date",  
"format": "dateOptionalTime"  
}  
}  
},  
"blocsepj": {  
"dynamic": "true",  
"\_all": {  
"enabled": false  
},  
"properties": {  
"blocepjid": {  
"type": "string"  
},  
"datemaj": {  
"type": "string",  
"index": "not\_analyzed",  
"store": true,  
"term\_vector": "with\_positions",  
"index\_options": "freqs"  
}, ...  
}

And here is my logstash conf :  
input {  
file {  
path =\> ["/home/myname/import\_data/slegoals\_partiel.csv"]  
start\_position =\> beginning  
}  
}  
filter {  
if (([message] =~ "id\_geozone") or ([message] =~ "goal")) {  
drop { }  
} else {  
csv {  
columns =\> ["\_parentId","startdate","enddate","goals"]  
separator =\> ";"  
}  
}  
}  
filter {  
mutate {  
add\_field =\> { "\_parent" =\> "%{\_parentId}" }  
remove\_field =\> ["@timestamp","message","@version","host","path"]  
convert =\> ["goals", "integer"]  
}  
}  
output {  
elasticsearch {  
hosts =\> ["127.0.0.1:9201"]  
index =\> "myindexv3"  
document\_type =\> "slegoals"  
document\_id =\> "%{\_parentId}"  
routing =\> "%{\_parent}"  
}  
stdout { codec =\> rubydebug }  
}

---

<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, 5:23am UTC](https://discuss.elastic.co/t/parent-child-with-elasticsearch-2-0-and-logstash-2-0/34057/2 "2017-07-06T05:23:34Z")

</div>


