Common error - Root mapping definition has unsupported parameters


(Olga) #1

I try to make index for Apache access logs.

curl -XPUT '172.16.1.136:9200/apache_access' -d '{

"settings": {
"number_of_replicas": "1",
"number_of_shards": "1"
},
"mappings": {
"properties": {
"clientip": {
"type": "string",
"index": "not_analyzed"
},
"ident": {
"type": "string",
"index": "not_analyzed"
},
"auth": {
"type": "string",
"index": "not_analyzed"
},
"timestamp": {
"type": "date",
"format": "date_time_no_millis"
},
"verb": {
"type": "string",
"index": "not_analyzed"
},
"request": {
"type": "string",
"index": "not_analyzed"
},
"httpversion": {
"type": "string",
"index": "not_analyzed"
},
"rawrequest": {
"type": "string",
"index": "not_analyzed"
},
"response": {
"type": "string",
"index": "not_analyzed"
},
"bytes": {
"type": "string",
"index": "not_analyzed"
},
"referrer": {
"type": "string",
"index": "not_analyzed"
},
"agent": {
"type": "string",
"index": "not_analyzed"
} } } }'

It looks like correct, but I have following error:
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mappin g definition has unsupported parameters:... and here ES gives me ALL my parameters as unsupported.

I really need help.


(Jun Ohtani) #2

You should define mapping type after mappings before properties.

Like user or blogpost in this example


(system) #3