Excluding fields from results

Hi there,

I just checked the docs, and it is possible to include only some
fields in the response instead of the whole _source variable. See
http://www.elasticsearch.org/guide/reference/api/search/fields.html

I'd like to do it vice versa: Is it possible to exclude certain fields
instead of including?

And the next thing which wonders me is the fact, that a new JSON
variable is created instead of _source called fields. Do I have any
influence on this name? I'd like not to change the frontend code
relying on the structure of the JSON :slight_smile:

Thanks for helping and have a nice day!

--Alexander

No, you can't exclude fields, and you can't change the names.

On Wed, Oct 19, 2011 at 10:00 AM, Alexander Reelsen <
alexander.reelsen@googlemail.com> wrote:

Hi there,

I just checked the docs, and it is possible to include only some
fields in the response instead of the whole _source variable. See
Elasticsearch Platform — Find real-time answers at scale | Elastic

I'd like to do it vice versa: Is it possible to exclude certain fields
instead of including?

And the next thing which wonders me is the fact, that a new JSON
variable is created instead of _source called fields. Do I have any
influence on this name? I'd like not to change the frontend code
relying on the structure of the JSON :slight_smile:

Thanks for helping and have a nice day!

--Alexander

And can we use the mapping in order to obtain the same result? instead of exclude in query time exclude in indexing time?

Thanks