I am using Nested Document structure to index document in Solr 8.11.1. I have some of the documents which has not any child. I want a count or documents which have no nested child, how can I get it ?
ex. { { id: "1", name: "my Name", type: "book", review: { id: "11", comment: "my comment1", type: "review" }, { id: "12", comment: "my comment2", type: "review" } }, { id: "2", name: "my Name2", type: "book", review: { id: "11", comment: "my comment3", type: "review" } }, { id: "3", name: "my Name3", type: "book" } }
Here expecting result document count 1 or response with document id:3.(Their is no child for id 3)
I was trying with facet query but only getting buckets.
http://localhost:8983/solr/books/select?q=type:book&json.facet={books:{type:terms,field:id,limit:-1,facet:{reviews:{domain:{blockChildren:"type:book"},type:query,q:"type:review"}}}}&rows=0&wt=XML