Returning some fields without _source, is it possible?

Hi,
I know this has been asked a bunch and I see the answer regarding fetching
only some fields from a query.
However, my documents have thousands of dynamic fields. I cannot define
them in a mapping with "stored: True".
The documents are megabytes in size. I do not want elastic search returning
a 45MB _source result for each
and then pluck fields from there.

Is it possible to query and retrieve only a few fields from results? I do
not want _source....too big....

thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6370df09-7035-447a-a36c-b8082ee78606%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Yes, it it possible:

You could also use the 'fields' parameter in the URL:
localhost:9200/index-name/type-name/id?pretty&fields=id,name

alex

On Wednesday, December 4, 2013 10:58:56 AM UTC-5, project2501 wrote:

Hi,
I know this has been asked a bunch and I see the answer regarding
fetching only some fields from a query.
However, my documents have thousands of dynamic fields. I cannot define
them in a mapping with "stored: True".
The documents are megabytes in size. I do not want Elasticsearch
returning a 45MB _source result for each
and then pluck fields from there.

Is it possible to query and retrieve only a few fields from results? I do
not want _source....too big....

thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/11e519ea-9f5e-47c6-8d0a-6caed246b997%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.