• 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
    --------------------- 

  • 相关阅读:
    mybatis几种开发方式
    SpringData,JPA,MongoDB,Solr,Elasticsearch底层逻辑关系
    简论远程通信(RPC,Webservice,RMI,JMS的区别)
    spring/spring boot/spring mvc中用到的注解
    Centos常用命名
    Mybatis详解
    Java成长之路
    Hibernate 与Mybatis之比较
    Struts2 与SpringMVC之比较
    Maven 配置文件详解
  • 原文地址:https://www.cnblogs.com/ly570/p/10987466.html
Copyright © 2020-2023  润新知