zoukankan      html  css  js  c++  java
  • Elasticsearch学习(一)————简单命令

    Elasticsearch
    一.简介
    **Elasticsearch 是一个分布式的搜索和分析引擎,可以用于全文检索、结构化检索和分析,并能将这三者结合起来。Elasticsearch 基于 Lucene 开发,现在是使用最广的开源搜索引擎之一,Wikipedia、Stack Overflow、GitHub 等都基于 Elasticsearch 来构建他们的搜索引擎。**
    1
    二.简单命令
    注意:kibana中如下,如果是postman:GET HTTP://IP:PORT/_cat/health?v

    1. GET _cat/health?v 查看集群的健康状况
    示例:
    epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
    1558361442 14:10:42 elasticsearch yellow 1 1 8 8 0 0 11 0 - 42.1%
    1
    2
    3
    4
    2. GET _cat/indices?v //查看集群中有哪些索引
    示例:
    health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
    yellow open obj z01R9FXXTv6Rizq0EqtFew 3 2 0 0 573b 573b
    yellow open test ioDbb57KSbaC6iwaRiKT7A 5 1 1 0 6.3kb 6.3kb
    1
    2
    3
    4
    5
    3. PUT /index_name?pretty //创建索引
    1
    5. DELETE /index_name?pretty //删除索引
    1
    6. POST /index/type/id 或者 PUT /index/type/id //也可以不指定id, es会生成base64的20长度的字符串ID,集群下不可能重复
    {json}
    1
    2
    7. POST /index/type/id 或者 PUT /index/type/id 修改内容
    {json} //注意;POST 修改某个;PUT 必须 带上所有字段
    //kibana: POST /index/type/id/_update PUT /index/type/id/_update
    --------------------- 

  • 相关阅读:
    [做题记录-乱做] [AGC004F] Namori
    字符串分割去除空格
    逆向实战01-嘟嘟牛在线
    mysql超8小时解决
    macbook golang的debug模式不好使
    博客暂时废弃公告
    [干货] 博客园主题
    [Contest on 2021.10.14] 我靠,真的好困!
    [Contest on 2021.10.9] 说好的 100kb 呢?
    [Contest on 2021.10.7] 已经起不了标题了...
  • 原文地址:https://www.cnblogs.com/ly570/p/10987466.html
Copyright © 2011-2022 走看看