美文网首页
es的crud操作

es的crud操作

作者: 万物皆有序和公式 | 来源:发表于2018-12-03 19:34 被阅读0次

    —- 查看所有索引172.16.14.174
    curl -XGET 'http://192.168.21.16:9200/_cat/indices?v&pretty'
    —- 表结构
    curl -XGET 'http://192.168.21.16:9200/selection_badreview_monitor_log_index/selection_badreview_monitor_log_index/_mapping?pretty'
    -- 新增列
    curl -H "Content-Type: application/json" -XPOST 'http://172.16.14.174:9200/selection_product_basic_latest_v1/_mapping/selection_product_basic_latest_v1' -d '{"properties":{"combine_column":{"type": "keyword"}}}'
    -- 删除
    curl -XDELETE 'http://172.16.14.174:9200/selection_product_basic_latest_v1'
    -- 查询
    curl -H "Content-Type: application/json" -XPOST 'http://192.168.21.16:9200/selection_badreview_monitor_log_index/selection_badreview_monitor_log_index/_search?pretty' -d '
    {
    "query":{
    "range":{
    "reviewDate":{
    "gte": "2018-10-12",
    "lte": "2018-10-13"
    } }}
    }'
    -- 新增
    curl -H "Content-Type: application/json" -XPOST 'http://172.16.31.74:9200/selection_product_basic/selection_product_basic' -d'
    {
    "marketplace": "amazon",
    "day": "2018-08-24",
    "product_current_asin": "liuwei",
    "product_parent_asin": "B01JHTFTC8",
    "product_current_category": "Socks",
    "product_parent_categories": [
    "Clothing, Shoes & Jewelry",
    "Baby",
    "Baby Boys",
    "Accessories"
    ],
    "product_categories": [
    "Clothing, Shoes & Jewelry",
    "Baby",
    "Baby Boys",
    "Accessories",
    "Socks"
    ],
    "timestamp": "2018-08-27 19:48:30"
    }'
    -- 查询表结构
    curl -XGET 'http://172.16.14.174:9200/selection_product_basic_latest_v1/selection_product_basic_latest_v1/_mapping?pretty'
    --

    相关文章

      网友评论

          本文标题:es的crud操作

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