# How to modify the setting parameters of the index

**URL:** <https://discuss.elastic.co/t/how-to-modify-the-setting-parameters-of-the-index/218722>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [February 11, 2020, 7:23am UTC](https://discuss.elastic.co/t/how-to-modify-the-setting-parameters-of-the-index/218722 "2020-02-11T07:23:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![k3v8ns](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@k3v8ns](https://discuss.elastic.co/u/k3v8ns)\
**Post date:** [February 11, 2020, 7:23am UTC](https://discuss.elastic.co/t/how-to-modify-the-setting-parameters-of-the-index/218722/1 "2020-02-11T07:23:50Z")

</div>

i want to modify all index settings config in index\_settings.

rally version: 1.3.0  
cmd:  
esrally race --track=geonames --track-params=index\_settings:  
["index.number\_of\_shards:1","index.number\_of\_replicas:1"]  
or  
esrally race --track=geonames --track-params=index\_settings:{"index":{"number\_of\_shards":1,"number\_of\_replicas":1}}

but return as :

index\_settings:[index.number\_of\_shards:1,index.number\_of\_replicas:1]  
Traceback (most recent call last):  
File "/root/miniconda3/bin/esrally", line 8, in   
sys.exit(main())  
File "/root/miniconda3/lib/python3.7/site-packages/esrally/rally.py", line 633, in main  
cfg.add(config.Scope.applicationOverride, "track", "params", opts.to\_dict(args.track\_params))  
File "/root/miniconda3/lib/python3.7/site-packages/esrally/utils/opts.py", line 84, in to\_dict  
return default\_parser(csv\_to\_list(arg))  
File "/root/miniconda3/lib/python3.7/site-packages/esrally/utils/opts.py", line 71, in kv\_to\_map  
k, v = kv.split(":")  
ValueError: too many values to unpack (expected 2)

as follows :

from rally-tracks/geonames/challenges/default.json

```json
        {
          "operation": {
            "operation-type": "create-index",
            "settings": {{index_settings | default({}) | tojson}}
          }
        }

```

and README.MD  
index\_settings: A list of index settings. Index settings defined elsewhere (e.g. number\_of\_replicas) need to be overridden explicitly.

but i cannot find the way to modify the index\_settings???

---

<div class="post-metadata">

**Author:** ![Dennis\_Lawler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dennis_lawler/32/48376_2.png) [@Dennis\_Lawler](https://discuss.elastic.co/u/Dennis_Lawler)\
**Post date:** [February 12, 2020, 4:42pm UTC](https://discuss.elastic.co/t/how-to-modify-the-setting-parameters-of-the-index/218722/2 "2020-02-12T16:42:05Z")

</div>

Hi K3v8ns,

To make this argument work with track-params as an inline CLI argument, you would need:

```auto
--track-params={"index_settings":{"index":{"number_of_shards":1,"number_of_replicas":1}}}

```

That is, to use parameters with dictionary values, the entire `track-params` argument must be a dictionary, not just the specific dictionary value.

Passing a dictionary via command-line arguments can be quite awkward with shell escaping and globbing often getting in the way. So, rather than working around this it may be easier easier to try:  
`--track-params=params.json`  
and in params.json:

```auto
{
  "index_settings":{
    "index":{
      "number_of_shards":1,
      "number_of_replicas":1
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 11, 2020, 4:44pm UTC](https://discuss.elastic.co/t/how-to-modify-the-setting-parameters-of-the-index/218722/3 "2020-03-11T16:44:03Z")

</div>

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