Fork me on GitHub

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"
                }
            }
        ]
    }
}

其他的操作就不测试了~

posted @ 2019-04-08 17:20  龙码精神  阅读(262)  评论(0编辑  收藏  举报