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

Settings filter not applied to default settings #29539

Closed
javanna opened this issue Apr 16, 2018 · 2 comments
Closed

Settings filter not applied to default settings #29539

javanna opened this issue Apr 16, 2018 · 2 comments
Labels
>bug :Core/Infra/Settings Settings infrastructure and APIs

Comments

@javanna
Copy link
Member

javanna commented Apr 16, 2018

As part of #29229 we realized that the get index settings API allows to filter the returned settings by providing an expression as part of the url:

curl 'localhost:9200/_settings/index.number*?pretty'
{
  "test" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "5",
        "number_of_replicas" : "1"
      }
    }
  }
}

Such filter is not applied to the default settings though when requested through the include_defaults parameter.

curl 'localhost:9200/_settings/index.number*?pretty&include_defaults=true'
{
  "test" : {
    "settings" : {
      "index" : {
        "number_of_shards" : "5",
        "number_of_replicas" : "1"
      }
    },
    "defaults" : {
      "index" : {
        "max_ngram_diff" : "1",
        "translog" : {
          "generation_threshold_size" : "64mb",
          "flush_threshold_size" : "512mb",
          "sync_interval" : "5s",
          "retention" : {
            "size" : "512mb",
            "age" : "12h"
          },
          "durability" : "REQUEST"
        },
        "auto_expand_replicas" : "false",
        "max_inner_result_window" : "100",
        "mapper" : {
          "dynamic" : "true"
        },
        "requests" : {
          "cache" : {
            "enable" : "true"
          }
        },
        "unassigned" : {
          "node_left" : {
            "delayed_timeout" : "1m"
          }
        },
        "max_terms_count" : "65536",
        "data_path" : "",
        "highlight" : {
          "max_analyzed_offset" : "-1"
        },
        "routing" : {
          "rebalance" : {
            "enable" : "all"
          },
          "allocation" : {
            "enable" : "all",
            "total_shards_per_node" : "-1"
          }
        },
        "search" : {
          "slowlog" : {
            "level" : "TRACE",
            "threshold" : {
              "fetch" : {
                "warn" : "-1",
                "trace" : "-1",
                "debug" : "-1",
                "info" : "-1"
              },
              "query" : {
                "warn" : "-1",
                "trace" : "-1",
                "debug" : "-1",
                "info" : "-1"
              }
            }
          }
        },
        "fielddata" : {
          "cache" : "node"
        },
        "routing_partition_size" : "1",
        "max_docvalue_fields_search" : "100",
        "merge" : {
          "scheduler" : {
            "max_thread_count" : "2",
            "auto_throttle" : "true",
            "max_merge_count" : "7"
          },
          "policy" : {
            "reclaim_deletes_weight" : "2.0",
            "floor_segment" : "2mb",
            "max_merge_at_once_explicit" : "30",
            "max_merge_at_once" : "10",
            "max_merged_segment" : "5gb",
            "expunge_deletes_allowed" : "10.0",
            "segments_per_tier" : "10.0"
          }
        },
        "max_refresh_listeners" : "1000",
        "max_slices_per_scroll" : "1024",
        "shard" : {
          "check_on_startup" : "false"
        },
        "load_fixed_bitset_filters_eagerly" : "true",
        "number_of_routing_shards" : "5",
        "write" : {
          "wait_for_active_shards" : "1"
        },
        "percolator" : {
          "map_unmapped_fields_as_text" : "false",
          "map_unmapped_fields_as_string" : "false"
        },
        "allocation" : {
          "max_retries" : "5"
        },
        "mapping" : {
          "coerce" : "false",
          "nested_fields" : {
            "limit" : "50"
          },
          "depth" : {
            "limit" : "20"
          },
          "ignore_malformed" : "false",
          "total_fields" : {
            "limit" : "1000"
          }
        },
        "refresh_interval" : "1s",
        "indexing" : {
          "slowlog" : {
            "reformat" : "true",
            "threshold" : {
              "index" : {
                "warn" : "-1",
                "trace" : "-1",
                "debug" : "-1",
                "info" : "-1"
              }
            },
            "source" : "1000",
            "level" : "TRACE"
          }
        },
        "compound_format" : "0.1",
        "blocks" : {
          "metadata" : "false",
          "read" : "false",
          "read_only_allow_delete" : "false",
          "read_only" : "false",
          "write" : "false"
        },
        "max_script_fields" : "32",
        "query" : {
          "default_field" : [
            "*"
          ],
          "parse" : {
            "allow_unmapped_fields" : "true"
          }
        },
        "format" : "0",
        "max_result_window" : "10000",
        "sort" : {
          "missing" : [ ],
          "mode" : [ ],
          "field" : [ ],
          "order" : [ ]
        },
        "store" : {
          "stats_refresh_interval" : "10s",
          "type" : "",
          "fs" : {
            "fs_lock" : "native"
          },
          "preload" : [ ]
        },
        "priority" : "1",
        "queries" : {
          "cache" : {
            "everything" : "false",
            "enabled" : "true"
          }
        },
        "ttl" : {
          "disable_purge" : "false"
        },
        "warmer" : {
          "enabled" : "true"
        },
        "codec" : "default",
        "max_rescore_window" : "10000",
        "max_adjacency_matrix_filters" : "100",
        "max_shingle_diff" : "3",
        "gc_deletes" : "60s",
        "optimize_auto_generated_id" : "true",
        "query_string" : {
          "lenient" : "false"
        }
      }
    }
  }
}

I think that default settings should also be filtered, such that the following request yields the following response:

curl 'localhost:9200/_settings/index.auto*?pretty&include_defaults=true'
{
  "test" : {
    "settings" : { },
    "defaults" : {
      "index" : {
        "auto_expand_replicas" : "false"
      }
    }
  }
}

Relates to #29229

@javanna javanna added >bug :Core/Infra/Settings Settings infrastructure and APIs labels Apr 16, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@javanna
Copy link
Member Author

javanna commented May 7, 2018

This has been fixed as part of #29229 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Settings Settings infrastructure and APIs
Projects
None yet
Development

No branches or pull requests

2 participants