美文网首页
elasticsearch 创建索引 mapping 分词

elasticsearch 创建索引 mapping 分词

作者: 淼哥1986 | 来源:发表于2020-04-16 10:57 被阅读0次

PUT

http://{{url}}/index1

Content-Type application/json

{
    "mappings": {
        "{{mappings}}": {
            "properties": {
                "interest": {
                    "type": "text",
                    "analyzer": "ik_max_word"
                },
                "account_number": {
                    "type": "text"
                },
                "balance": {
                    "type": "integer"
                },
                "firstname": {
                    "type": "text"
                },
                "lastname": {
                    "type": "text"
                },
                "age": {
                    "type": "integer"
                },
                "gender": {
                    "type": "text"
                },
                "address": {
                    "type": "text"
                },
                "employer": {
                    "type": "text"
                },
                "email": {
                    "type": "text"
                },
                "city": {
                    "type": "text"
                },
                "state": {
                    "type": "text"
                }
            }
        }
    },
    "settings": {
        "number_of_shards": 1,
        "number_of_replicas": 1
    }
}

相关文章

网友评论

      本文标题:elasticsearch 创建索引 mapping 分词

      本文链接:https://www.haomeiwen.com/subject/reolvhtx.html