Returning a subset of nested objects


(John Harding) #1

I can use the _source object to return a subset of fields in the root and in the nested objects.

However, is there a way to return a subset of the nested objects rather than all of them?

I have a nested set of nested properties which are name/value pairs and I only want to retrieve the property whose name="foo"...

Thanks,
John H


(Dan Tuffery) #2

If I have understood you correctly, you can do that with the Inner Hits functionality.


(John Harding) #3

Thanks Dan - that was exactly what I needed.

Does anyone know of any way to predict the likelihood of this becoming official (i.e. dropping the experimental tag)? I understand there probably can't be a definitive answer to this - but is there a way to determine a probability based on past experiences?

Thanks!


(system) #4