Skip to content

Unable to change enabled setting when update mapping #28070

Closed
@dnhatn

Description

@dnhatn

Steps to reproduce

  1. Create a new index with enabled=false
curl -XPUT -H 'Content-Type:application/json' 'localhost:9200/twitter' -d '
{
  "mappings": {
    "doc": {
      "properties": {
        "session": {
          "type": "object",
          "enabled": false
        }
      }
    }
  }
}'
  1. Update mapping with enabled=true and received an acknowledgment
curl -XPOST -H 'Content-Type:application/json' 'localhost:9200/twitter/_mapping/doc' -d '
{
  "properties": {
    "session": {
      "type": "object",
      "enabled": true
    }
  }
}'
  1. Query the mapping
curl 'localhost:9200/twitter/_mapping/doc'

{"twitter":{"mappings":{"doc":{"properties":{"session":{"type":"object","enabled":false}}}}}}

I am not sure if we support updating enabled attribute but we should not acknowledge if the update does not take effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Search Foundations/MappingIndex mappings, including merging and defining field types>bugTeam:Search FoundationsMeta label for the Search Foundations team in Elasticsearch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions