zoukankan      html  css  js  c++  java
  • ElasticSearch简要总览

    今天看了一下ElasticSearch的相关文档,我做了如下总结:

    发现越来越喜欢画图归纳总结知识了,看图说话

    集群特性说明

    健康状况的说明

    如何配置分片?

     接下来一张图总结下操作相关的总结

     接下来,随便来个API测试下,先创建数据吧,这里随便封装下API

     可以看到已经创建成功了

     

    接下来我们来试试查询

    {
        "took": 4,
        "timed_out": false,
        "_shards": {
            "total": 5,
            "successful": 5,
            "skipped": 0,
            "failed": 0
        },
        "hits": {
            "total": 2,
            "max_score": 1,
            "hits": [
                {
                    "_index": "mydatabase",
                    "_type": "mytable",
                    "_id": "123",
                    "_score": 1,
                    "_source": {
                        "first_name": "John",
                        "last_name": "Smith",
                        "age": 25,
                        "about": "I love to go rock climbing",
                        "interests": [
                            "sports",
                            "music"
                        ]
                    }
                },
                {
                    "_index": "mydatabase",
                    "_type": "mytable",
                    "_id": "456",
                    "_score": 1,
                    "_source": {
                        "mylove": "i love you"
                    }
                }
            ]
        }
    }

    这里可以看到我们添加的数据了

    安装图形中的命令在走一下

    可以得到结果

    {
        "took": 5,
        "timed_out": false,
        "_shards": {
            "total": 5,
            "successful": 5,
            "skipped": 0,
            "failed": 0
        },
        "hits": {
            "total": 1,
            "max_score": 0.2876821,
            "hits": [
                {
                    "_index": "mydatabase",
                    "_type": "mytable",
                    "_id": "456",
                    "_score": 0.2876821,
                    "_source": {
                        "mylove": "i love you"
                    }
                }
            ]
        }
    }

    其他的操作就不测试了~

  • 相关阅读:
    python count函数
    kubenetes服务发现
    k8s网络
    k8s创建pod流程
    openstack创建虚拟流程、各组件介绍
    生产者消费者问题
    Date类和Calendar类
    Timer定时器
    Java中的克隆
    注解
  • 原文地址:https://www.cnblogs.com/liyouming/p/10671858.html
Copyright © 2011-2022 走看看