Access key value pair from the index using document fields in a script


(Srinivasan Ramaswamy) #1

I am trying to access a nested field the form of a map (basically key value
pairs) using document fields inside a script. But I am only able to get the
values and not the names Is that possible ? I looked at the code
for ScriptDocValues and it looks like it supports only four
types Longs, Doubles, GeoPoints and Strings. Here is the format i am trying
to get

"nested_field_name": {
"field_name1": field_value (number),
"field_name2": field_value (number),
"field_name3": field_value (number)
}

Is there any way i can access a key value pair using document fields
(doc[nested_field_name] format ) ?

Thanks
Srini

--
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/c7d5f7db-bca7-453e-a83b-00d1f39b0bca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2