-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
I created an index with a few not_analyzed fields, but when I try to create a pie chart or I do a simple search it says that my fields are analyzed.
I post
curl -XPUT localhost:9200/wwwpp_modsec_log12 -d'
{
"wwwpp_modsec_log12" : {
"aliases" : { },
"mappings" : {
"wwwpp_modsec_log12" : {
"properties" : {
"accuracy" : {
"type" : "string"
},
"client" : {
"type" : "string"
},
"data" : {
"type" : "string"
},
"datetime" : {
"type" : "string"
},
"file" : {
"type" : "string"
},
"hostname" : {
"type" : "string"
},
"id" : {
"type" : "string"
},
"iso8601" : {
"type" : "date",
"format" : "strict_date_optional_time||epoch_millis"
},
"line" : {
"type" : "string"
},
"maturity" : {
"type" : "string"
},
"message1" : {
"type" : "string"
},
"message2" : {
"type" : "string"
},
"msg" : {
"type" : "string"
},
"pid" : {
"type" : "string"
},
"rev" : {
"type" : "string"
},
"severity" : {
"type" : "string"
},
"mtag1" : {
"type" : "string",
"index": "not_analyzed"
},
"mtag2" : {
"type" : "string",
"index": "not_analyzed"
},
"mtag3" : {
"type" : "string",
"index": "not_analyzed"
},
"mtag4" : {
"type" : "string",
"index": "not_analyzed"
},
"mtag5" : {
"type" : "string",
"index": "not_analyzed"
},
"type" : {
"type" : "string"
},
"unique_id" : {
"type" : "string"
},
"muri" : {
"type" : "string",
"index": "not_analyzed"
},
"ver" : {
"type" : "string"
}
}
}
},
"settings" : {
"index" : {
"creation_date" : "1459531992288",
"uuid" : "wA-K3lWaQJe5MR4T2y1whg",
"number_of_replicas" : "1",
"number_of_shards" : "5",
"version" : {
"created" : "2030099"
}
}
},
"warmers" : { }
}
}'
And when I query the index I get
curl -XGET 'http://localhost:9200/wwwpp_modsec_log12?pretty'
{
"wwwpp_modsec_log12" : {
"aliases" : { },
"mappings" : {
"wwwpp_modsec_log12" : {
"properties" : {
"accuracy" : {
"type" : "string"
},
"client" : {
"type" : "string"
},
"data" : {
"type" : "string"
},
"datetime" : {
"type" : "string"
},
"file" : {
"type" : "string"
},
"hostname" : {
"type" : "string"
},
"id" : {
"type" : "string"
},
"iso8601" : {
"type" : "date",
"format" : "strict_date_optional_time||epoch_millis"
},
"line" : {
"type" : "string"
},
"maturity" : {
"type" : "string"
},
"message1" : {
"type" : "string"
},
"message2" : {
"type" : "string"
},
"msg" : {
"type" : "string"
},
"mtag1" : {
"type" : "string"
},
"mtag2" : {
"type" : "string"
},
"mtag3" : {
"type" : "string"
},
"mtag4" : {
"type" : "string"
},
"mtag5" : {
"type" : "string"
},
"muri" : {
"type" : "string"
},
"pid" : {
"type" : "string"
},
"rev" : {
"type" : "string"
},
"severity" : {
"type" : "string"
},
"type" : {
"type" : "string"
},
"unique_id" : {
"type" : "string"
},
"ver" : {
"type" : "string"
}
}
}
},
"settings" : {
"index" : {
"wwwpp_modsec_log12" : {
"settings" : {
"index" : {
"creation_date" : "1459531992288",
"uuid" : "wA-K3lWaQJe5MR4T2y1whg",
"number_of_replicas" : "1",
"number_of_shards" : "5",
"version" : {
"created" : "2030099"
}
}
},
"mappings" : {
"wwwpp_modsec_log12" : {
"properties" : {
"rev" : {
"type" : "string"
},
"muri" : {
"type" : "string",
"index" : "not_analyzed"
},
"maturity" : {
"type" : "string"
},
"mtag2" : {
"type" : "string",
"index" : "not_analyzed"
},
"client" : {
"type" : "string"
},
"mtag1" : {
"type" : "string",
"index" : "not_analyzed"
},
"mtag4" : {
"type" : "string",
"index" : "not_analyzed"
},
"mtag3" : {
"type" : "string",
"index" : "not_analyzed"
},
"data" : {
"type" : "string"
},
"mtag5" : {
"type" : "string",
"index" : "not_analyzed"
},
"hostname" : {
"type" : "string"
},
"line" : {
"type" : "string"
},
"severity" : {
"type" : "string"
},
"pid" : {
"type" : "string"
},
"ver" : {
"type" : "string"
},
"type" : {
"type" : "string"
},
"message1" : {
"type" : "string"
},
"msg" : {
"type" : "string"
},
"message2" : {
"type" : "string"
},
"unique_id" : {
"type" : "string"
},
"id" : {
"type" : "string"
},
"file" : {
"type" : "string"
},
"iso8601" : {
"type" : "date",
"format" : "strict_date_optional_time||epoch_millis"
},
"datetime" : {
"type" : "string"
},
"accuracy" : {
"type" : "string"
}
}
}
}
},
"creation_date" : "1459538378998",
"uuid" : "mpeLjRrrReaMKdAOhaMO9Q",
"number_of_replicas" : "1",
"number_of_shards" : "5",
"version" : {
"created" : "2030099"
}
}
},
"warmers" : { }
}
}
Using elastic search 2.2