Skip to content

Commit 4dae4ac

Browse files
rahulvudutalaMarkLogic Builder
authored andcommitted
DHFPROD-9657: Limit number of nodes returned on graph search
1 parent c5c7d21 commit 4dae4ac

File tree

1 file changed

+1
-1
lines changed
  • marklogic-data-hub/src/main/resources/ml-modules/root/data-hub/5/impl

1 file changed

+1
-1
lines changed

marklogic-data-hub/src/main/resources/ml-modules/root/data-hub/5/impl/graph-utils.sjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ function getEntityNodesWithRelated(entityTypeIRIs, relatedEntityTypeIRIs, predic
150150
fullPlanConcept = filterConceptsQuery.joinLeftOuter(fullPlanConcept, joinOn);
151151
}
152152
fullPlanConcept = fullPlanConcept.joinInner(subjectPlan, joinOn);
153-
fullPlan = fullPlan.union(fullPlanConcept);
153+
fullPlan = fullPlan.union(fullPlanConcept).limit(limit);
154154
}
155155
return fullPlan.result(null, {conceptFacetList, entitiesDifferentFromBaseAndRelated, entityTypeIRIs, predicateConceptList, entityTypeOrConceptIRI: relatedEntityTypeIRIs.concat(getRdfConceptTypes()), labelIRI: getOrderedLabelPredicates()}).toArray();
156156
}

0 commit comments

Comments
 (0)