Commit 4b8751cb by TJBChris

Modified search walker to not return edges on the last depth level of a

crawl.
parent 58b52738
...@@ -90,7 +90,8 @@ public class GraphBackedDiscoveryService implements DiscoveryService { ...@@ -90,7 +90,8 @@ public class GraphBackedDiscoveryService implements DiscoveryService {
// Add to the Vertex map. // Add to the Vertex map.
v.put(vtx.getId().toString(), new JSONObject(jsonVertexMap)); v.put(vtx.getId().toString(), new JSONObject(jsonVertexMap));
// Follow this Vertex's edges // Follow this Vertex's edges if this isn't the last level of depth
if (counter < max) {
while (edgeIterator != null && edgeIterator.hasNext()) { while (edgeIterator != null && edgeIterator.hasNext()) {
Edge edge = edgeIterator.next(); Edge edge = edgeIterator.next();
...@@ -123,6 +124,7 @@ public class GraphBackedDiscoveryService implements DiscoveryService { ...@@ -123,6 +124,7 @@ public class GraphBackedDiscoveryService implements DiscoveryService {
} }
} }
} }
}
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment