Hi,
Could some one help me figure out what is the issue with below Logstash
Configuration /mapping template . ES seems to ignore the mappings specified
in the template and stores everything as string.
I am using Logstash csv plugin to create index. My logstash conf file has
csv filter as below:
filter {
csv {
columns => ["ESpeedRef","ProcessName",TotalMilliSec,AnyFloatNumber]
separator => ","
}
output {
elasticsearch{
protocol => "http"
host => "localhost"
index => "test_index"
}
}
Below json template is used to define field mappings. I use curl to send
template to ES.
{"template": "test_index",
"settings": {
"number_of_shards": 1
},
"mappings": {
"user": {
"properties": {
"ESpeedRef": {"type" : "string"},
"ProcessName": {"type" : "string"},
"TotalMilliSec": {"type" : "integer"},
"AnyFloatNumber": {"type" : "float"}
}
}
}
}
When creating index, Elastic Search does apply this template. I can confirm
this my looking at below console stmts:
[2014-11-24 13:22:51,099][INFO ][cluster.metadata ] [Captain
America] [
test_index] creating index, cause [auto(bulk api)], shards [1]/[1], mappings
[user]
[2014-11-24 13:22:51,146][INFO ][cluster.metadata ] [Captain
America] [
test_index] update_mapping [logs] (dynamic)
In Kibana i see the fields TotalMilliSec and AnyFloatNumber are saved as
string.. why??
Thanks
Rashmi
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/568cb316-5946-4fbc-ad87-f65a413b990d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.