Index mapping error

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

That's not a valid value for the index property, see index | Elasticsearch Guide [8.11] | Elastic

Also use text instead of string

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