Search Document

Products

JCS for Elasticsearch

2022-02-21 06:56:23

Query document

Query a single document

GET blog_index/user/7XcMIW4BmdCR56kZ_30N
The query is successful when the response is as follows:
{
  "_index" : "blog_index",
  "_type" : "user",
  "_id" : "7XcMIW4BmdCR56kZ_30N",
  "_version" : 1,
  "found" : true,
  "_source" : {
    "title" : "manager1",
    "name" : "Tom1",
    "age" : 35
  }
}

Batch query document

GET blog_index/user/_search
The query is successful when the response is as follows:
{
  "took" : 3,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : 6,
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "blog_index",
        "_type" : "user",
        "_id" : "LZUHIW4BV7zpY8wX5j3q",
        "_score" : 1.0,
        "_source" : {
          "title" : "manager2",
          "name" : "Tom2",
          "age" : 36
        }
      },
      {
        "_index" : "blog_index",
        "_type" : "user",
        "_id" : "7XcMIW4BmdCR56kZ_30N",
        "_score" : 1.0,
        "_source" : {
          "title" : "manager1",
          "name" : "Tom1",
          "age" : 35
        }
      },
      {
        "_index" : "blog_index",
        "_type" : "user",
        "_id" : "LpUHIW4BV7zpY8wX5j3q",
        "_score" : 1.0,
        "_source" : {
          "title" : "manager3",
          "name" : "Tom3",
          "age" : 37
        }
      }
    ]
  }
}

Feedback

开始与售前顾问沟通

可直接拨打电话 400-098-8505转1

我们的产品专家为您找到最合适的产品/解决⽅案

在线咨询 5*8⼩时

1v1线上咨询获取售前专业咨询

点击咨询
企微服务助手

专业产品顾问,随时随地沟通