Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index Templates API: GET templates doesn't honor the flat_settings parameter. #6671

Closed
grantr opened this issue Jul 1, 2014 · 2 comments · Fixed by #6672
Closed

Index Templates API: GET templates doesn't honor the flat_settings parameter. #6671

grantr opened this issue Jul 1, 2014 · 2 comments · Fixed by #6672

Comments

@grantr
Copy link

grantr commented Jul 1, 2014

It appears there is no way to get nested settings from template GET.

$ curl localhost:9200
{
  "status" : 200,
  "name" : "Ezekiel",
  "version" : {
    "number" : "1.2.1",
    "build_hash" : "6c95b759f9e7ef0f8e17f77d850da43ce8a4b364",
    "build_timestamp" : "2014-06-03T15:02:52Z",
    "build_snapshot" : false,
    "lucene_version" : "4.8"
  },
  "tagline" : "You Know, for Search"
}

$ curl -XPUT localhost:9200/_template/test1 -d '{
    "template": "test1-*",
    "settings": {
        "index": {
            "mapper": {
                "dynamic": false
            }
        }
    }
}'
{"acknowledged":true}

$ curl -XGET 'localhost:9200/_template/test1?pretty'
{
  "test1" : {
    "order" : 0,
    "template" : "test1-*",
    "settings" : {
      "index.mapper.dynamic" : "false"
    },
    "mappings" : { },
    "aliases" : { }
  }
}

curl -XGET 'localhost:9200/_template/test1?pretty&flat_settings=false'
{
  "test1" : {
    "order" : 0,
    "template" : "test1-*",
    "settings" : {
      "index.mapper.dynamic" : "false"
    },
    "mappings" : { },
    "aliases" : { }
  }
}
@jpountz jpountz self-assigned this Jul 2, 2014
@jpountz jpountz changed the title GET template returns settings with flat keys Templates: GET template returns settings with flat keys Jul 2, 2014
@jpountz
Copy link
Contributor

jpountz commented Jul 2, 2014

Thanks for the report, I'll look into it.

@jpountz
Copy link
Contributor

jpountz commented Jul 2, 2014

It will be fixed in the 1.3.0 release. I did not backport to 1.2.2 as there is a minor break since it changes the default for the GET template API from flat_settings=false to flat_settings=true.

@jpountz jpountz changed the title Templates: GET template returns settings with flat keys Templates: GET templates doesn't honor the flat_settings parameter. Jul 2, 2014
jpountz added a commit that referenced this issue Jul 2, 2014
@clintongormley clintongormley changed the title Templates: GET templates doesn't honor the flat_settings parameter. Index Templates API: GET templates doesn't honor the flat_settings parameter. Jul 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants