Skip to content

KuzzleDataMapping.mapping is undefined when retrieving an empty mapping #95

@scottinet

Description

@scottinet

It's possible to have empty mappings in elasticsearch:

{
  "index": {
    "mappings": {
      "collection": {}
    }
  }
}

The SDK expects a properties attributes in the object returned by Elasticsearch, but in this case, there is none. And the SDK ends up building a KuzzleDataMapping object with an undefined mapping, causing unpredictable behaviors.

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