Skip to content

Serializing query _source without includes or excludes fails #1796

@Romanx

Description

@Romanx

Both of the following examples are equivalent in terms of ES however the second is the only one that works when serializing a query into a SearchResponse.

  "_source": [
      "id",
      "price",
      "tradeprice",
      "title",
      "description",
      "url",
      "abv",
      "volume",
      "age",
      "stocklevel",
      "hasdram",
      "productimage",
      "atomstock",
      "distilleryurl",
      "isdiscontinued",
      "comingsoon",
      "stockincoming",
      "distillery",
      "releasedate",
      "isvatableproduct",
      "hasfreeshipping",
      "userrating",
      "preorder",
      "maxnumberpercustomer",
      "reviewcount"
    ],
  "_source": {
    "include": [
      "id",
      "price",
      "tradeprice",
      "title",
      "description",
      "url",
      "abv",
      "volume",
      "age",
      "stocklevel",
      "hasdram",
      "productimage",
      "atomstock",
      "distilleryurl",
      "isdiscontinued",
      "comingsoon",
      "stockincoming",
      "distillery",
      "releasedate",
      "isvatableproduct",
      "hasfreeshipping",
      "userrating",
      "preorder",
      "maxnumberpercustomer",
      "reviewcount"
    ]
  }

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