中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Elasticsearch中怎么添加新字段

發布時間:2021-06-22 17:36:43 來源:億速云 閱讀:2324 作者:Leah 欄目:編程語言

這篇文章給大家介紹Elasticsearch中怎么添加新字段,內容非常詳細,感興趣的小伙伴們可以參考借鑒,希望對大家能有所幫助。

1、添加字段,并設置是否索引

PUT http://xxx.xxx.xxx.xxx:9200/goods_info/_mapping

{
  "properties": {
    "content": {
      "type":"text",
      "index":false
    }
  }
}

2、獲取字段mapping

GET http://xxx.xxx.xxx.xxx:9200/goods_info/_mapping

{
    "goods_info": {
        "mappings": {
            "properties": {
                "browseLevels": {
                    "type": "long"
                },
                "categoryIds": {
                    "type": "long"
                },
                "content": {
                    "type": "text",
                    "index": false
                },
                "dataType": {
                    "type": "long"
                },
                "endTimeMs": {
                    "type": "long"
                },
                "esId": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "esxSellOut": {
                    "type": "boolean"
                },
                "extTypes": {
                    "type": "long"
                },
                "goodsCode": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "goodsId": {
                    "type": "long"
                },
                "groupIds": {
                    "type": "long"
                },
                "hasOption": {
                    "type": "long"
                },
                "isBuyNumLimit": {
                    "type": "boolean"
                },
                "isDiscount": {
                    "type": "long"
                },
                "isJoinMemberPrice": {
                    "type": "long"
                },
                "joinMemberDiscount": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "labelIds": {
                    "type": "long"
                },
                "levelCredit1": {
                    "type": "long"
                },
                "levelCredit2": {
                    "type": "long"
                },
                "levelCredit3": {
                    "type": "long"
                },
                "levelPrice1": {
                    "type": "float"
                },
                "levelPrice2": {
                    "type": "float"
                },
                "levelPrice3": {
                    "type": "float"
                },
                "levelSalesCount1": {
                    "type": "long"
                },
                "levelSalesCount2": {
                    "type": "long"
                },
                "levelSalesCount3": {
                    "type": "long"
                },
                "maxBuyTotal": {
                    "type": "long"
                },
                "maxPrice": {
                    "type": "float"
                },
                "minPrice": {
                    "type": "float"
                },
                "originalPrice": {
                    "type": "float"
                },
                "price": {
                    "type": "float"
                },
                "putawayTime": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "putawayTimeMs": {
                    "type": "long"
                },
                "salesCount": {
                    "type": "long"
                },
                "salesHide": {
                    "type": "long"
                },
                "shopId": {
                    "type": "long"
                },
                "shortTitle": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "startTimeMs": {
                    "type": "long"
                },
                "status": {
                    "type": "long"
                },
                "stock": {
                    "type": "long"
                },
                "stockHide": {
                    "type": "long"
                },
                "subTitle": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "thumb": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "title": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "type": {
                    "type": "long"
                },
                "unit": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "video": {
                    "type": "text",
                    "fields": {
                        "keyword": {
                            "type": "keyword",
                            "ignore_above": 256
                        }
                    }
                },
                "virtualCardId": {
                    "type": "long"
                },
                "zeroCashLevel": {
                    "type": "long"
                }
            }
        }
    }
}

關于Elasticsearch中怎么添加新字段就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

大洼县| 西和县| 韶山市| 同江市| 大悟县| 井冈山市| 东阳市| 锡林郭勒盟| 清原| 宁都县| 图木舒克市| 滦南县| 济宁市| 哈尔滨市| 青川县| 阿坝| 天津市| 丹阳市| 利津县| 石首市| 临颍县| 韶关市| 五华县| 宁国市| 庆元县| 长阳| 普定县| 英山县| 巴彦县| 蛟河市| 民丰县| 宁乡县| 遂平县| 鄂托克前旗| 乌海市| 璧山县| 文安县| 金沙县| 手游| 井冈山市| 博乐市|