Removing _source tag from results?

I'd like to minimize the query output that ES generates to the essentials only. To do this, I'm using filter_query = hits.total,hits.hits._source.email,hits.hits._source.name. This works as expected, stripping fields like _score, _index and _id:

{
      "_source": {
        "email": "jeroen@topsecret.xxx",
        "name": "jeroen1"
      }
}

However, I want to get rid of _source as well, ending up with:

{
        "email": "jeroen@topsecret.xxx",
        "name": "jeroen1"
}

How can I do this? Thanks!

First: wrap code in ` and code blocks in ``` so they are easier to read.

Second: there isn't a generic transformation like that available that I know of. In general the other options around what fields are returned are about not having to load or deserialize them, not how they look.

Code blocks inserted, sorry.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.