Single Node Changing Number of Shards and Indexes

Hi there guys

I have a single node with ES 5, if I want to change the number of index and shard in elasticsearch.yml it complains that the configuration file should have no index/shard configuration references at all that it should be changed with curl, I want to change those parameter cuz is taking too much disk space

This is what I've got right now, only 3 hosts and taking 6GB of disk space:

{
  "cluster_name" : "elasticsearch",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 71,
  "active_shards" : 71,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 71,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 50.0
}

So, I'd like to know the procedure to change those parameters globaly ( default number of indexes and shards ) before creating any index,

Thanks
Regards

You can control this per index pattern through index templates. If you want to reduce the number of primary shards for existing indices, you can use the shrink index API. As you only have one node, you can also change the number of replicas to 0, which will eliminate the initialised shards (Elasticsearch never stores primary and replica shard on the same node anyway).

Thank you very much
Regards

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.