Skip to content

Instantly share code, notes, and snippets.

@szydan
Created March 20, 2025 23:04
Show Gist options
  • Save szydan/35160debce7d1c8039a36c1a13f0bfa6 to your computer and use it in GitHub Desktop.
Save szydan/35160debce7d1c8039a36c1a13f0bfa6 to your computer and use it in GitHub Desktop.
To manually fix unassigned shard
GET _cat/nodes?format=json
GET _cat/shards/index-name
GET _cat/indices/index-name
POST _cluster/reroute
{
"commands": [{
"allocate_empty_primary": {
"index": "index-name",
"shard": 0,
"node": "node-name",
"accept_data_loss": true
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment