elasticsearch index

1578 단어 elasticsearch
색인

#     
PUT blog

#  
DELETE blog

#  
HEAD blog

#  
GET _cat/indices




분할
#  、 

#  setting 
GET blog/_settings

#  setting 
GET blog,article/_settings


#  setting 
GET _all/_settings

#  、     5  1 
#  3   2 
PUT blog 
{
    "settings":{
        "number_of_shards":3,
        "number_of_replicas":2
    }
}


#    
PUT blog/_settings
{
    "settings":{
        "number_of_replicas":2
    }
}

읽기 및 쓰기 권한

#  , 
index.blocks.read_only:true

#  
blocks.read:true

#  
blocks.write:true

PUT blog/_settings
{
    "blocks.write":true
}


# "blocks.write":true  , 
PUT blog/_doc/1
{
    "title":"welcome to elasticsearch"
}

#  
PUT blog/_settings
{
    "blocks.write":false
}


#  
GET blog/_search


#     
PUT blog/_settings
{
    "blocks.read":true
}


#  
PUT blog/_settings
{
    "index.blocks.read_only":true
}


인덱스 열기/닫기
#  
POST blog/_close

#  
POST blog/_open

#  
POST blog,article/_open

#     test 
POST test*/_close

 
색인 복사
# dest     
POST _reindex 
{
  "source": {"index": "blog"},
  "dest": {"index": "blog2"}
}

인덱스 축소
 
색인 별칭

POST /_aliases
{
  "actions": [
    {
      "add": {
        "index": "blog",
        "alias": "blog-a1"
      }
    }
  ]
}

 
 
 

좋은 웹페이지 즐겨찾기