if maxDepth is 0, a $graphLookup acts as a normal $lookup, does $lookup works along with allowDiskUse set to true, if so, is it better to use $lookup with pipeline array and $expr operator so it can take advantage of Indexes, instead of $graphLookup which ignores allowDiskUse even it is true ?
Hi @Adithya_95821 ,
AllowDiskUsage is not directly related to indexes but to amount of memory a stage in aggregation consume , without disk swapping it can be 100MB.
If there is no graph Search but just a lookup I recommend going with $lookup.
However, $expr means the query is dynamically built and therefore indexes might not be used as the query pattern will be hard to assemble.
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.