Elasticsearch v1.0 specify fields reponse change


(n8) #1

Regarding the statement in fields return value for the change implemented
in v1.0:

"By always returning arrays, this simplifies user code."

Can someone please tell me how this simplifies user code? If I index an
array, I expect an array back and I have nothing more to do than fetch the
"_fields". If I index a value, say first_name, why on earth would I want to
parse through "_fields" and pull out the value from an array? Very unhappy
with this change.

--
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/b5b55af6-d3c6-4155-a3e7-3c471cd8100a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Nik Everett) #2

It certainly didn't simplify anything for me either. For the most part its
best to switch to source filtering, spits out results similarly to how
fields used to.

Nik

On Fri, Apr 25, 2014 at 3:59 PM, n8 ndcolling@gmail.com wrote:

Regarding the statement in fields return value for the change implemented
in v1.0:

"By always returning arrays, this simplifies user code."

Can someone please tell me how this simplifies user code? If I index an
array, I expect an array back and I have nothing more to do than fetch the
"_fields". If I index a value, say first_name, why on earth would I want
to
parse through "_fields" and pull out the value from an array? Very unhappy
with this change.

--
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/b5b55af6-d3c6-4155-a3e7-3c471cd8100a%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/b5b55af6-d3c6-4155-a3e7-3c471cd8100a%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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/CAPmjWd0B1NBaOC9yB72dmGBMxJ%2BR1XN%3DUW6wG0PO05xZX-OSdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3