zoukankan      html  css  js  c++  java
  • elasticsearch操作命令

    总结几个es的curl操作命令:

    查询某条数据:curl -XGET http://elasticsearch:9200/company/company/123?pretty

    查询索引下数据总量:curl -XGET http://elasticsearch:9200/company/company/_count?pretty

    根据条件查询:curl -XGET http://elasticsearch:9200/company/company/_search?pretty -d '{"query": {"bool":{"must":[{"term":{"aId":"10"}},{"term":{"uId":"333"}}]}}}'

    复制一个索引:curl -XPOST 'http://elasticsearch:9200/_reindex' -d '{"source": {"index": "company"},"dest": {"index": "company_bak","op_type": "create"}}'

    查看所有索引状态:curl -XGET 'http://elasticsearch:9200/_cat/indices?v' 

    清空某个索引数据:curl -XPOST 'http://elasticsearch:9200/company/company/_delete_by_query?refresh&slices=5&pretty' -H 'Content-Type: application/json' -d '{"query": {"match_all": {}}}'

    在某个索引下添加mapping:curl -XGET http://elasticsearch:9200/_mapping/company' -d '{"properties": {"address": {"type": "text","fields": {"keyword": {"type": "keyword","ignore_above": 256}}}}}'

  • 相关阅读:
    VTK二维图像的三维显示
    VtkTransform 和 SetPosition的区别
    Qt QList 遍历元素
    Qt QList详解
    QT QList介绍及应用
    Qt 生成随机区间浮点数 generateRand
    Qt qsrand qrand 产生随机数的两只方法
    Qt QStringLiteral
    Qt QMap简单用法
    Qt 遍历QMap
  • 原文地址:https://www.cnblogs.com/hupc/p/11834462.html
Copyright © 2011-2022 走看看