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 }
}