Skip to content

Settings should be rendered in more readable way when human flag is set to true #4140

@imotov

Description

@imotov

Settings in many REST APIs are hard to read because they are presented in a flattened format. REST APIs that output settings should observe the human flag and render settings in a structured format if flag human is true.

Without human flag:

$ curl -XGET 'http://localhost:9200/test-idx/_settings?pretty'
{
  "test-idx" : {
    "settings" : {
      "index.analysis.analyzer.default.filter.1" : "lowercase",
      "index.analysis.analyzer.default.filter.2" : "stop",
      "index.analysis.analyzer.default.filter.0" : "standard",
      "index.analysis.analyzer.default.tokenizer" : "uax_url_email",
      "index.analysis.analyzer.default.type" : "custom",
      "index.number_of_shards" : "5",
      "index.number_of_replicas" : "1",
      "index.version.created" : "1000002",
      "index.uuid" : "_VSsOKiwTJ-uq8-3n74nog"
    }
  }
}

with human flag:

$ curl -XGET 'http://localhost:9200/test-idx/_settings?pretty&human'
{
  "test-idx" : {
    "settings" : {
      "index" : {
        "uuid" : "_VSsOKiwTJ-uq8-3n74nog",
        "analysis" : {
          "analyzer" : {
            "default" : {
              "type" : "custom",
              "filter" : [ "standard", "lowercase", "stop" ],
              "tokenizer" : "uax_url_email"
            }
          }
        },
        "number_of_replicas" : "1",
        "number_of_shards" : "5",
        "version" : {
          "created" : "1000002"
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions