lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bell <chrsd...@gmail.com>
Subject Nested Document (aka Block Join) Query with Multiple Criteria
Date Wed, 22 Feb 2017 19:47:08 GMT
I am trying to perform a Nested Document query containing multiple
criteria, which can be treated as an AND in regards to the parent document.

With the structure:

ParentDocument: {
    id:1
    ChildDocument: {
        id:1.1
        field1:value1,
        field2:value2
    },
    ChildDocument: {
        id:1.2
        field1:value3,
        field2:value4
    }
},
ParentDocument: {
    id:2
    ChildDocument: {
        id:2.1
        field1:value1,
        field2:value2
    },
    ChildDocument: {
        id:2.2
        field1:value5,
        field2:value6
    }
}

I want to have a criteria that would say:
"Give me the parents where any of the children fulfill these requirements:
field1:value1 and field2:value4"

Based on this criteria, I would expect ParentDocument with id:1 as the only
document that's returned, since ChildDocument 1.1 fulfills the criteria of
field1:value1 and ChildDocument 1.2 fulfills field2:value4

Is this even possible? And if so, how would I go about performing and
constructing the query?

I am running with Solr 6.1 in a single core mode at the moment, but I plan
to eventually move to a Solr Cloud

Chris Bell

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message