# Problem with JSON query understanding

**URL:** <https://discuss.elastic.co/t/problem-with-json-query-understanding/268020>\
**Category:** Elasticsearch\
**Created:** [March 22, 2021, 9:02pm UTC](https://discuss.elastic.co/t/problem-with-json-query-understanding/268020 "2021-03-22T21:02:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![baka109](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@baka109](https://discuss.elastic.co/u/baka109)\
**Post date:** [March 22, 2021, 9:02pm UTC](https://discuss.elastic.co/t/problem-with-json-query-understanding/268020/1 "2021-03-22T21:02:33Z")

</div>

Hello there! I need a little help to understand what I'm doing wrong.

I need to modify this index template trying not to rewrite all of this settings and add a value refresh\_interval

curl localhost:9200/\_template/test-template

```auto
    {
    "test-template": {
        "aliases": {},
        "mappings": {
            "message": {
                "_source": {
                    "enabled": true
                },
                "dynamic_templates": [
                    {
                        "internal_fields": {
                            "mapping": {
                                "type": "keyword"
                            },
                            "match": "gl2_*",
                            "match_mapping_type": "string"
                        }
                    },
                    {
                        "store_generic": {
                            "mapping": {
                                "index": "not_analyzed"
                            },
                            "match": "*"
                        }
                    }
                ],
                "properties": {
                    "full_message": {
                        "analyzer": "standard",
                        "fielddata": false,
                        "type": "text"
                    },
                    "gl2_accounted_message_size": {
                        "type": "long"
                    },
                    "gl2_processing_timestamp": {
                        "format": "yyyy-MM-dd HH:mm:ss.SSS",
                        "type": "date"
                    },
                    "gl2_receive_timestamp": {
                        "format": "yyyy-MM-dd HH:mm:ss.SSS",
                        "type": "date"
                    },
                    "message": {
                        "analyzer": "standard",
                        "fielddata": false,
                        "type": "text"
                    },
                    "source": {
                        "analyzer": "analyzer_keyword",
                        "fielddata": true,
                        "type": "text"
                    },
                    "streams": {
                        "type": "keyword"
                    },
                    "timestamp": {
                        "format": "yyyy-MM-dd HH:mm:ss.SSS",
                        "type": "date"
                    }
                }
            }
        },
        "order": -1,
        "settings": {
            "index": {
                "analysis": {
                    "analyzer": {
                        "analyzer_keyword": {
                            "filter": "lowercase",
                            "tokenizer": "keyword"
                        }
                    }
                }
            }
        },
        "template": "test_*"
    }
}

```

curl -XPUT localhost:9200/\_template/test-template?pretty -d '

```auto
{
"template": "test_*",
 "settings": {
    "index": { 
      "refresh_interval": "3600s" 
    }
  }
}'

```

On output I get this:

```auto
{
    "test-template": {
        "aliases": {},
        "mappings": {},
        "order": 0,
        "settings": {
            "index": {
                "refresh_interval": "3600s"
            }
        },
        "template": "test_*"
    }
}

```

---

<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:** [April 19, 2021, 9:03pm UTC](https://discuss.elastic.co/t/problem-with-json-query-understanding/268020/2 "2021-04-19T21:03:30Z")

</div>

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