aquasecurity / esquery

An idiomatic Go query builder for ElasticSearch
Apache License 2.0
305 stars 56 forks source link

Only return certain fields #17

Open mooijtech opened 2 years ago

mooijtech commented 2 years ago

Hello,

I was wondering if you could add functionality to only return certain fields? I'm loading in thousands of messages and it would save memory to only return the body and header when a user clicks a message.

References: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html

Kind regards, Marten Mooij

fcarrero commented 2 years ago

maybe using SourceIncludes()