rahulgoswami commented on code in PR #5356:
URL: https://github.com/apache/solr/pull/5356#discussion_r4650680498


##########
solr/core/src/test/org/apache/solr/search/join/GraphQueryTest.java:
##########
@@ -140,6 +140,76 @@ public void doGraph(SolrParams p) throws Exception {
     assertJQ(
         req(p, "q", "{!graph from=${node_id} to=${edge_id} returnRoot=false 
maxDepth=1}id:doc_1"),
         "/response/numFound==1");
+
+    // lookupFilter: nodes not matching it are collected, but their edges are 
not followed

Review Comment:
   - The JSON facet path has no code specific to expandFilter. 
FacetParser.jsonToSolrParams copies every key in the graph map into the 
parser's params and createDomainQuery hands them to GraphQueryParser. So the 
new test would only re-check that generic copying, and the existing 
traversalFilter case in testDomainGraph() already does that.
   - Coverage is already there. All the logic that matters (parsing, collecting 
without expanding, cache keys) is covered by GraphQueryTest and 
QueryEqualityTest, and the facet path runs through the same parser.
   - testDomainGraph() uses a self-graph on cat_s (from=cat_s to=cat_s). 
Building a case where a reached node is counted but its descendants aren't 
would need new test data, which is a lot of work for little coverage.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to