Elasticsearch 6.2.4
Я хочу создать индекс с полем пользовательского типа mapping.
Пытался создать индекс, используя пример в документе:
curl -H 'Content-Type: application/json' -XPUT 'localhost:9200/twitter?pretty' -d'
{
"mappings": {
"user": {
"properties": {
"name": { "type": "text" },
"user_name": { "type": "keyword" },
"email": { "type": "keyword" }
}
},
"tweet": {
"properties": {
"content": { "type": "text" },
"user_name": { "type": "keyword" },
"tweeted_at": { "type": "date" }
}
}
}
}'
И получил ошибку:
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Rejecting mapping update to [twitter] as the final mapping would have more than 1 type: [tweet, user]"
}
],
"type" : "illegal_argument_exception",
"reason" : "Rejecting mapping update to [twitter] as the final mapping would have more than 1 type: [tweet, user]"
},
"status" : 400
}