首先查看index文档信息

$ curl -XGET "http://172.16.101.55:9200/_cat/indices?v"

输出

health status index    uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   customer DvLoM7NjSYyjTwD5BSkK3A   1   1      20000            0       10mb           10mb

查看当前elasticsearch中的数据信息

$ curl -XGET "http://172.16.101.55:9200/customer/_search?pretty" -H "Content-Type: application/json" -d '{ "query": { "match_all": {} }, "sort": [ { "customerid": "desc" } ], "from": 0, "size": 1 }'

输出

{
  "took" : 4,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 10000,
      "relation" : "gte"
    },
    "max_score" : null,
    "hits" : [
      {
        "_index" : "customer",
        "_type" : "_doc",
        "_id" : "20000",
        "_score" : null,
        "_source" : {
          "customerid" : 20000,
          "firstname" : "WODADM",
          "lastname" : "AEBUFMJAWZ",
          "address1" : "6224597470 Dell Way",
          "address2" : null,
          "city" : "DVCINXG",
          "state" : null,
          "zip" : 0,
          "country" : "Australia",
          "region" : 2,
          "email" : "AEBUFMJAWZ@dell.com",
          "phone" : "6224597470",
          "creditcardtype" : 3,
          "creditcard" : "1869697669055313",
          "creditcardexpiration" : "2010/07",
          "username" : "user20000",
          "password" : "password",
          "age" : 37,
          "income" : 40000,
          "gender" : "F"
        },
        "sort" : [
          20000
        ]
      }
    ]
  }
}
View Code

相关文章:

  • 2021-07-05
  • 2021-06-29
  • 2021-06-25
  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2021-07-04
猜你喜欢
  • 2022-12-27
  • 2021-08-18
  • 2022-12-23
  • 2021-05-28
  • 2022-03-05
  • 2023-01-16
  • 2022-01-04
相关资源
相似解决方案