1 cluster status, additions and deletions, the total amount of replacement force created, the number of copies set number of fragments of a single index

  1. Check the health status of the cluster, the cluster can see color. (Yellow: primary shard are normal, replica abnormal)
    GET /_cat/health?v
  1. Clustered index lists all
    GET /_cat/indices?v
    GET _cluster/health
  2. PUT piece of data: if the specified document does not exist, create, there is the full amount of the replacement . If the index type does not exist, automatically create an index, type
PUT /beauties/cn/1
{
    "Name":"Zhao Liying",
    "Age":20,
    "Height":160,
    "3D":[80,60,80]
}

  

  1. Force the creation of the document: If you already exists, an error
    PUT  /test_index/test_type/4/_create
    {
        "f1":"test f1"
    }
  2. Gets the index, type, id corresponding data
GET  /beauties/cn/1
 
  1. Partial update of a document in a field (Partial Update)
POST /beauties/cn/1/_update
{
    "doc":{
        "Age":21    
    }
}
 
  1. To delete a data (specified index, type, id)
DELETE  /test_cluster/test_type/tid_1?pretty
 
 
  1. The number of points specified index sheets, the number of copies, for example: the number of fragments test_index 2, a copy of
 
 

Guess you like

Origin www.cnblogs.com/cc299/p/11032787.html