ElasticSearch 7.x 鎸囧畾绱㈠紩绫诲瀷鍑虹幇涓嬮潰閿欒

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ElasticSearch 7.x 鎸囧畾绱㈠紩绫诲瀷鍑虹幇涓嬮潰閿欒相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/mapping' title='mapping'>mapping   arch   fail   stat   tps   use   shard   number   guid   

 鎵ц浠g爜

# PUT璇锋眰锛?http://IP鍦板潃锛氱鍙?t1

{
    "settings": {
        "index": {
            "number_of_shards": "2",
            "number_of_replicas": "0"
        }
    },
    "mappings": {
        "person": {
            "properties": {
                "name": {
                    "type": "text"
                },
                "age": {
                    "type": "integer"
                },
                "mail": {
                    "type": "keyword"
                },
                "hobby": {
                    "type": "text"
                }
            }
        }
    }
}

 閿欒锛?/span>

{
    "error": {
        "root_cause": [
            {
                "type": "mapper_parsing_exception",
                "reason": "Root mapping definition has unsupported parameters:  [person : {properties={mail={type=keyword}, name={type=text}, age={type=integer}, hobby={type=text}}}]"
            }
        ],
        "type": "mapper_parsing_exception",
        "reason": "Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:  [person : {properties={mail={type=keyword}, name={type=text}, age={type=integer}, hobby={type=text}}}]",
        "caused_by": {
            "type": "mapper_parsing_exception",
            "reason": "Root mapping definition has unsupported parameters:  [person : {properties={mail={type=keyword}, name={type=text}, age={type=integer}, hobby={type=text}}}]"
        }
    },
    "status": 400
}

鍘熷洜锛欵lasticSearch 7.x 榛樿涓嶅湪鏀寔鎸囧畾绱㈠紩绫诲瀷

鍑虹幇杩欎釜鐨勫師鍥犳槸锛宔lasticsearch7榛樿涓嶅湪鏀寔鎸囧畾绱㈠紩绫诲瀷锛岄粯璁ょ储寮曠被鍨嬫槸_doc锛屽鏋滄兂鏀瑰彉锛屽垯閰嶇疆include_type_name: true 鍗冲彲銆傚畼鏂规枃妗o細https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html

以上是关于ElasticSearch 7.x 鎸囧畾绱㈠紩绫诲瀷鍑虹幇涓嬮潰閿欒的主要内容,如果未能解决你的问题,请参考以下文章

LN鍑芥暟璁$畻鎸囧畾鏁板€肩殑鑷劧瀵规暟

redis鎵归噺鍒犻櫎鎸囧畾鍓嶇紑key鍥涚鏂规硶

arcgis engine鎸囧畾鑼冨洿瀵煎嚭灞忓箷鍥剧墖

MongoDB mongoimport 浠巆sv瀵煎叆鏁版嵁鎸囧畾瀛楁绫诲瀷

nginx鎸囧畾鏂囦欢璺緞鏈変袱绉嶆柟寮弐oot鍜宎lias

Python璇诲彇mysql鏁版嵁锛岃浆涓篋ataFrame鏍煎紡骞舵牴鎹師TABLE涓殑COLUMNS鎸囧畾columns锛宨ndex