Reduce default shards for dynamic index

Hi Everyone,

I am processing logs via logstash and this creates new dynamic indexes based on a pattern. How can i reduce the default number of shards from 5 to 3.

--
Niraj

You can use Index Templates for this.

You define a template that is set to matche your dynamic index pattern, and sets number_of_shards to 3

Thanks @TimV It worked.