您当前的位置: 首页 >  ar

少林码僧

暂无认证

  • 3浏览

    0关注

    317博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Elasticsearch修改字段类型

少林码僧 发布时间:2019-02-20 20:45:24 ,浏览量:3

1.设置索引t2为想要的数据类型 2.将t1 reindex到t2 3.数据reindex完成删除t1 4.设置索引t1为想要的数据类型 5.将t2 reindex到t1
PUT t1
{
     "settings": {
      "index": {
        "number_of_shards": "2",
        "analysis": {
          "analyzer": {
            "ik_custom_analyzer": {
              "filter": [
                "lowercase"
              ],
              "type": "custom",
              "tokenizer": "ik_max_word"
            }
          }
        },
        "number_of_replicas": "1"
      }
    },
    "mappings": {
      "doc": {
        "properties": {
          "path": {
            "type": "text",
            "fields": {
         
关注
打赏
1661398670
查看更多评论
立即登录/注册

微信扫码登录

0.0733s