PUT報錯
{
??? "error": {
??????? "root_cause": [
??????????? {
??????????????? "type": "mapper_parsing_exception",
??????????????? "reason": "Root mapping definition has unsupported parameters:? [man : {properties={date={format=yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis, type=date}, country={type=keyword}, name={type=text}, age={type=integer}}}]"
??????????? }
??????? ],
??????? "type": "mapper_parsing_exception",
??????? "reason": "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:? [man : {properties={date={format=yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis, type=date}, country={type=keyword}, name={type=text}, age={type=integer}}}]",
??????? "caused_by": {
??????????? "type": "mapper_parsing_exception",
??????????? "reason": "Root mapping definition has unsupported parameters:? [man : {properties={date={format=yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis, type=date}, country={type=keyword}, name={type=text}, age={type=integer}}}]"
??????? }
??? },
??? "status": 400
}
2019-12-30
elasticsearch7默認(rèn)不在支持指定索引類型,默認(rèn)索引類型是_doc,如果想改變,則配置include_type_name: true 即可(這個沒有測試,官方文檔說的,無論是否可行,建議不要這么做,因為elasticsearch8后就不在提供該字段)。
{
?????? "settings": {
????????????? "number_of_shards": 3,
????????????? "number_of_replicas": 1
?????? },
?????? "mappings" : {
??????? "properties" : {
??????????? "name": {
??????????????????????????? "type": "text"
???????????????????? },
???????????????????? "country": {
??????????????????????????? "type": "keyword"
???????????????????? },
???????????????????? "age": {
??????????????????????????? "type": "integer"
???????????????????? },
???????????????????? "date": {
??????????????????????????? "type": "date",
??????????????????????????? "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
???????????????????? }
??????? }
??? }
}
2019-10-08
這個問題解決了沒?如果解決了,怎么解決的?
2019-04-28
我也這個錯,一臉懵逼...