Skip to content

Empty arrays not returned #2355

@djstrong

Description

@djstrong

Elasticsearch version (bin/elasticsearch --version): 8.6.2

elasticsearch-py version (elasticsearch.__versionstr__): 8.6.2

Please make sure the major version matches the Elasticsearch server you are running.

Description of the problem including expected versus actual behavior:
I have a document:

{
  "a": {
    "b": []
  }
}

and I search it asking for fields: {"fields": ["a.b"]}. If b is empty array (as above) then this field in response is missing, but when this array is not empty then it is returned.
I expect that in the first case the empty array will be returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions