You could use script_fields to generate the values you want:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-script-fields.html

may be a bit tricky though :)


On 12 March 2014 16:59, Ben Hirsch <[email protected]> wrote:

> Is it possible to filter the _source of nested data conditionally?
>
> For example, I have nested object data like this:
>
> {
>   "name" : "Thing",
>   "children" :
>   {
>     "id": "1",
>     "qty": "4"
>   },
>   {
>     "id": "2",
>     "qty": "5"
>   },
>   {
>     "id": "3",
>     "qty": "1"
>   },
>   {....}
> }
>
> In some cases I will have thousands of 'children' so I don't want to
> return them all on every query. I want to be able to just return children
> with certain "id" numbers.
>
> Is that possible?
>
>  --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/92f1283a-a8d9-4b2f-8e9e-32c0234c781d%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/92f1283a-a8d9-4b2f-8e9e-32c0234c781d%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPt3XKQcdMiBoAu3AhJ-UVbJJUadnELoLK0_i-w-zV7PNegK2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to