Re: Matching parent docs when two child docs match different criteria

2018-02-06 Thread Mikhail Khludnev
Matt, I don't really follow the new sample and the query, but you've got the first idea, I believe. Then, this requirement is not really boolean logic. So, it's obviously not easy to achieve. The second idea is - to use size:(M L)^=1 for children clause, then - use score=total in parent level and

Re: Matching parent docs when two child docs match different criteria

2018-02-05 Thread SuperMattio86
Thank you! That is interesting. But I think I failed to fully outline the requirements I have, since I can still contrive an example where this might not work. If I changed the document as follows: { "id":"3", "_level_":0, "_version_":1591607734461005824, "_childDoc

Re: Matching parent docs when two child docs match different criteria

2018-02-05 Thread Mikhail Khludnev
q=+{!parent .. v=$m} +{!parent .. v=$l}&m=size:(+M -L)&l=size:(+L -M) On Sun, Feb 4, 2018 at 10:56 PM, SuperMattio86 wrote: > Hello. > > As a toy example, let's assume I have documents that looks like this: > > { > "id": "1", > "_childDocuments_": [ > { > "id": "1_2", >