0

We have an Elastic Search engine that has been provisioned through App Search, and has a very large schema (large amount of fields). A lot of these fields are not necessary to the scope of our search requests and are returned in the _ignored section of the response object. Not only do we not use the _ignored data, but they are significantly bloating our response object from Elastic which is not ideal. Is there a way to prevent the _ignored section form being returned as a part of the result from a search request?

Edit An example of the request and response enter image description here

Luke
  • 776
  • 9
  • 24

1 Answers1

1

_ignored is metadata field of elasticsearch hence it can not be filter using source filter option.

You need to use Response Filtering using filter_path parameter in request.

Below is example where it will return only took, _id, _score, _source in search response.

POST index_name/_search?filter_path=took,hits.hits._id,hits.hits._score,hits.hits._source
{
  "query": {
    "exists": {
      "field": "_ignored"
    }
  }
}
Sagar Patel
  • 4,993
  • 1
  • 8
  • 19