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 then
 - cutoff weaker scored parents with {!frange l=2}

yeah. it's cumbersome.


On Tue, Feb 6, 2018 at 3:12 AM, SuperMattio86 <matt.peyr...@gmail.com>
wrote:

> 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,
>         "_childDocuments_":[
>         {
>           "id":"3_1",
>           "_path_":["p.1"],
>           "size":"M",
>           "color":"red",
>           "_level_":1,
>           "_version_":1591607734461005824,
>           "_path__str":["p.1"]}]}]
>        }
> ]}
>
> And I made a query similar to what you did: _query_:"{!parent
> which=_level_:0}size:M" AND _query_:"{!parent which=_level_:0}size:M"
>
> This document would match. So I'm asking for a different scenario here, but
> with the same operation in mind: How do I construct a query that will match
> a parent document that has two _different_ child docs, each with size:M.
>
> Or, in the more general case, how can I construct a query that contains _n_
> clauses, where each of the _n_ clauses must match a _different_ child
> document.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>



-- 
Sincerely yours
Mikhail Khludnev

Reply via email to