Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 2.33 KB

Elasticsearch.md

File metadata and controls

70 lines (51 loc) · 2.33 KB

Elasticsearch

Reads:

Basic Knowledge

Dedicated master nodes:

  • Track all nodes in the cluster.
  • Track the number of indexes in the cluster.
  • Track the number of shards belonging to each index.
  • Maintain routing information for nodes in the cluster.
  • Update the cluster state after state changes, such as creating an index and adding or removing nodes in the cluster.
  • Replicate changes to the cluster state across all nodes in the cluster.
  • Monitor the health of all cluster nodes by sending heartbeat signals, periodic signals that monitor the availability of the data nodes in the cluster.

Some useful APIs

http://elasticsearch-cheatsheet.jolicode.com

  1. Index statistics. The API is only intended for human use
GET _cat/indices?h=health,status,index,id,pri,rep,docs.count,docs.deleted,store.size,creation.date.string&v=
  1. Get unhealthy indices
GET _cat/indices?v&health=red&h=index,status,health
  1. Show shards recovery activities
GET _cat/recovery?v&active_only=true
  1. Explain cluster shard allocation
GET /_cluster/allocation/explain
  1. Get setting of an index
GET <INDEX>?features=settings&flat_settings
  1. Set max scroll
PUT _cluster/settings
{
    "persistent" : {
        "search.max_open_scroll_context": 2048
    },
    "transient": {
        "search.max_open_scroll_context": 2048
    }
}