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

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

集群特性说明

ElasticSearch简要总览

健康状况的说明

ElasticSearch简要总览

如何配置分片?

ElasticSearch简要总览

ElasticSearch简要总览

ElasticSearch简要总览

 

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

ElasticSearch简要总览

 

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

ElasticSearch简要总览

 可以看到已经创建成功了

 ElasticSearch简要总览

接下来我们来试试查询

ElasticSearch简要总览

ElasticSearch简要总览

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

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

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

ElasticSearch简要总览

可以得到结果

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

其他的操作就不测试了~

相关文章:

  • 2022-12-23
  • 2021-08-13
  • 2021-10-10
  • 2021-04-30
  • 2021-08-01
  • 2022-12-23
  • 2022-01-09
  • 2021-05-01
猜你喜欢
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2021-11-06
  • 2021-06-21
相关资源
相似解决方案