Index mapping error


(murali krishna) #1

I am trying to create index as below. It throws error either thru curl or kibana dev console.

curl -XPUT localhost:9200/fassicountry -d '{
"settings" : {
"number_of_shards" : 1
},
"mappings" : {
"type1" : {
"properties" : {
"STREAM_OPERATOR" : { "type" : "string", "index" : "fassicountry" }
}
}
}
-----------error
Failed to parse mapping [type1]: No handler for type [string] declared on field [STREAM_OPERATOR]","caused_by":{"type":"mapper_parsing_exception","reason":"No handler for type [string] declared on field [STREAM_OPERATOR]"}},"status":400


(Mark Walkom) #2

That's not a valid value for the index property, see https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-index.html


(David Pilato) #3

Also use text instead of string


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.