Skip to content

The enabled setting is not updatable (and probably shouldn't) #33566

Closed
@ywelsch

Description

@ywelsch

According to the docs , the enabled setting for mappings should be updatable (see TIP at the end), which it actually isn't:

PUT my_index 
{
  "mappings": {
    "doc": { 
      "properties": {
        "bla": {
          "properties": {
            "title":    { "type": "text"  }
          }
        }
      }
    }
  }
}

GET /my_index/_mapping/doc

PUT /my_index/_mapping/doc
{
  "properties": {
    "bla": {
      "enabled" : false
    }
  }
}

GET /my_index/_mapping/doc

-> returns same initial mapping :sadtrombone:

While implementing a fix, I noticed that we probably do not want to change and fix this, as this might lead to a surprising effects if the setting is changed during indexing (A field might be indexed on the primary but not on the replica (or vice versa)). Similarly, it might interfere in funny ways with reindexing.

I suggest updating the docs to say that this field is non-updateable, but wanted to raise it first for discussion with @elastic/es-search-aggs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions