Re: filtered has_child query?

2015-03-12 Thread asanderson
Actually, I do want only parent documents returned, but I want the filter to be applied to both parent and child documents. Is there a way to specify that the filter is to be applied before the query, so that this would be possible? If not, how would I rewrite the query to do this? -- You re

Re: filtered has_child query?

2015-03-11 Thread asanderson
On Wednesday, March 11, 2015 at 6:23:40 PM UTC-4, Perryn Fowler wrote: > > 'apply the filter before the query' doesn't make any sense to me - what > would it filter? I suspect I'm not really understanding you, can you tell > me more? Why do you want to be able to do this? How would it help? > T

Re: filtered has_child query?

2015-03-11 Thread Perryn Fowler
'apply the filter before the query' doesn't make any sense to me - what would it filter? I suspect I'm not really understanding you, can you tell me more? Why do you want to be able to do this? How would it help? anyway, from what I thing I do understand there are several ways to get the results

Re: filtered has_child query?

2015-03-10 Thread Perryn Fowler
ria to the has_child query. To get child documents, use 'Bar' in the url and take a look into the has_parent filter/query On Wed, Mar 11, 2015 at 10:23 AM, asanderson wrote: > Is a filtered has_child query possible where the filter is applied to the > child document before

filtered has_child query?

2015-03-10 Thread asanderson
Is a filtered has_child query possible where the filter is applied to the child document before the query of the has_child? e.g. Given the example below... curl -X PUT "http://localhost:9200/foobar"; -d "{\"mappings\":{\"Foo\":{},\"Bar\":{\"_