Querying elasticsearch to find items whose nested objects all contain some values

Hi,

I posted this elsewhere but I thought some people on this list could be
intersted by this too.

this is rather complex (at least to me). I have a load of items, let's say
they are meals. It could look something like:

'index' : 'meals',
'body' : {
'name' : {'type' : 'string'},
'dish' : {
'type' : 'nested',
'ingredients' : {'type' : 'array'},
}
}

Now, the first step is to find exactly ALL meals which contain butter in
ALL of their dishes.

The ultimate goal is to find exactly ALL meals which contain butter OR
margarine in ALL of their dishes.

Can anyone think how this can be done?

Thanks

P.S. Here too:
http://stackoverflow.com/questions/26929552/querying-elasticsearch-to-find-items-whose-nested-objects-all-contain-some-value

--
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/c789675f-d2e5-42d8-a6ce-224086ab8f2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.