elasticsearch 接口

#To check the cluster health
GET /_cat/health?v


#get a list of nodes
GET /_cat/nodes?v

# list all indices
GET /_cat/indices?v


# create an index named "customer" and then list all the indexes again
PUT /customer?pretty
GET /_cat/indices?v


# get by id
GET /customer1/_doc/1?pretty

# delete by id
DELETE /customer/_doc/1?pretty

#search
GET /customer1/_search?q=*
GET /customer1/_search?q=*&sort=account_number:asc&pretty


GET /bank/_search
{
  "query": { "match_all": {} },
  "from": 10,
  "size": 10
}


GET /bank/_search
{
  "query": { "match_all": {} },
  "sort": { "balance": { "order": "desc" } }
}

猜你喜欢

转载自blog.csdn.net/kq1983/article/details/89242338