Hello Dima,
Look at
"q":"{!parent which=\"*:* is_child:false\"}(
it means SHOULD matchAll, SHOULD is_child:false
You need just `{!parent which=is_child:false}...`
I'm noticing an unclosed double quote in the query above, it may freakn out
the query parser which isn't bulletproof, you know.
Enjoy
On Sat, Dec 13, 2025 at 12:58 AM Dmitri Maziuk <[email protected]>
wrote:
> Hi all,
>
> we're still struggling here with child documents, here's my problem du
> jour (solr 8.11):
>
> in the index:
> ```
> {
> "id": "W0178E6",
> "odams.identifier": "W0178E6",
> "is_child": false,
> ...
> "child_objects": [
> {
> "id": "W0178E6!W0178F2",
> "odams.identifier": "W0178F2",
> "is_child":true
> },
> ...
> ```
> with more children:
>
> "id": "W0178E6!W0178EX",
> "id": "W0178E6!W0178F9",
> "id": "W0178E6!W0178F7",
> "id": "W0178E6!W0178F3",
> "id": "W0178E6!W0178F1",
> "id": "W0178E6!W0178EZ",
> "id": "W0178E6!W0178EY",
> "id": "W0178E6!W0178EO",
> "id": "W0178E6!W0178EM",
>
> My reading of The Fine Manual @
> https://solr.apache.org/guide/8_11/searching-nested-documents.html is that
> `q={!parent which="*:* +is_child:false}(+odams.identifier:W0178F2)`
> should return the parent: W0178E6.
>
> What I get instead is
> ```
> {
> "responseHeader":{
> "status":0,
> "QTime":18,
> "params":{
> "q":"{!parent which=\"*:* is_child:false\"}(
> odams.identifier:W0178F2)",
> "debugQuery":"true"}},
> "response":{"numFound":1,"start":0,"numFoundExact":true,"docs":[
> {
> ...
> "id":"W0178E6!W0178EX",
> "odams.identifier":"W0178EX",
> ...
> }]
> },
> "debug":{
> "rawquerystring":"{!parent which=\"*:* is_child:false\"}(
> odams.identifier:W0178F2)",
> "querystring":"{!parent which=\"*:* is_child:false\"}(
> odams.identifier:W0178F2)",
> "parsedquery":"AllParentsAware(ToParentBlockJoinQuery
> (+odams.identifier:W0178F2))",
> "parsedquery_toString":"ToParentBlockJoinQuery
> (+odams.identifier:W0178F2)",
> "explain":{
> "W0178E6!W0178EX":"\n0.0 = Not a match\n"},
> "QParser":"BlockJoinParentQParser",
> "timing":{
> ...
> ```
>
> Any ideas why?
> What does is even mean `"W0178E6!W0178EX":" 0.0 = Not a match"` with the
> "W0178E6!W0178EX" document returned?
>
> Any hints welcome, TIA
> Dima
>
>
--
Sincerely yours
Mikhail Khludnev