Difference between _source and fields projections

(Udi Ben Amitai) #1

My question is about the performance (or other) impact of the difference
between _source and fields projection.
These 2 queries return (at least in my perspective) an equivalent result:
==> {... "_source":{"name":"blah"}}
==>{... "fields":{"name":"blah"}}

In cases where the _source is stored -
Is there a preference to one of the approaches?
performance/memory/functional wise?


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/3fada4a4-d80a-43b9-b256-f93987177d87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

(Felipe Santos) #2

I would like to know the difference too

(Nik Everett) #3

Generally you should prefer _source. They are different but not much
different. Fields is for loading stored fields and source is for filtering
source. The funky thing is that one can simulate the other pretty well.

(system) #4