How about something like 

({!join from=parent to=id}color:red) AND ({!join from=parent to=id}color:blue) ?

11.12.2014, 19:48, "Darin Amos" <dari...@gmail.com>:
> Hello,
>
> I am trying to execute a join query that I am not 100% sure how to execute. 
> Lets say I have a bunch of parent and child documents and every one of my 
> child documents has a single value field “color”.
>
> If I want to search all parents that have a “red” child, tis is very easy:
>
> {!join from=parent to=id}color:red
>
> However, if I want to return only parents that have both a red AND a blue 
> item it gets tricky.
>
> This query would return parents that have red OR blue
> {!join from=parent to=id}color:red OR color:blue
>
> And this query would return nothing since no child had both colors.
> {!join from=parent to=id}color:red AND color:blue
>
> Any suggestions? My thinking is I might require some kind of custom query.
>
> Thanks!
>
> Darin

Reply via email to