Hi All , Solr 8.2 Database structure . Parent -> Children Each child has parent referenceId
Query: Get Parent doc based on child query Method 1: {!graph from=parentId to=parentId traversalFilter='docType:parent' returnRoot=false}child.name:foo AND child.type:name Result : 1 Debug: "rawquerystring": "{!graph from=parentId to=parentId traversalFilter='docType:parent' returnRoot=false}child.name:foo AND child.type:name", "querystring": "{!graph from=parentId to=parentId traversalFilter='docType:parent' returnRoot=false}child.name:foo AND child.type:name", "parsedquery": "GraphQuery([[+child.name:foo +child.type:name],parentId=parentId] [TraversalFilter: docType:parent][maxDepth=-1][returnRoot=false][onlyLeafNodes=false][useAutn=false])", "parsedquery_toString": "[[+child.name:foo +child.type:name],parentId=parentId] [TraversalFilter: docType:parent][maxDepth=-1][returnRoot=false][onlyLeafNodes=false][useAutn=false]", Method 2: ({!graph from=parentId to=parentId traversalFilter='docType:parent' returnRoot=false}child.name:foo AND child.type:name) Result : 0 Debug: "rawquerystring": "({!graph from=parentId to=parentId traversalFilter='docType:parent' returnRoot=false}child.name:foo AND child.type:name)", "querystring": "({!graph from=parentId to=parentId traversalFilter='docType:parent' returnRoot=false}child.name:foo AND child.type:name)", "parsedquery": "+GraphQuery([[child.name:foo],parentId=parentId] [TraversalFilter: docType:parent][maxDepth=-1][returnRoot=false][onlyLeafNodes=false][useAutn=false]) +child.type:name", "parsedquery_toString": "+[[child.name:foo],parentId=parentId] [TraversalFilter: docType:parent][maxDepth=-1][returnRoot=false][onlyLeafNodes=false][useAutn=false] +child.type:name", Any reason why it works differently . Regards sam