You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@s2graph.apache.org by st...@apache.org on 2018/04/05 08:41:30 UTC

[3/6] incubator-s2graph git commit: add query limit

add query limit


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/a68e1947
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/a68e1947
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/a68e1947

Branch: refs/heads/master
Commit: a68e194717bc2483a4349a973eb3cb17fe1af2e6
Parents: da15232
Author: daewon <da...@apache.org>
Authored: Wed Apr 4 14:46:59 2018 +0900
Committer: daewon <da...@apache.org>
Committed: Wed Apr 4 14:46:59 2018 +0900

----------------------------------------------------------------------
 .../org/apache/s2graph/graphql/repository/GraphRepository.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/a68e1947/s2graphql/src/main/scala/org/apache/s2graph/graphql/repository/GraphRepository.scala
----------------------------------------------------------------------
diff --git a/s2graphql/src/main/scala/org/apache/s2graph/graphql/repository/GraphRepository.scala b/s2graphql/src/main/scala/org/apache/s2graph/graphql/repository/GraphRepository.scala
index ca06bc8..4a3e8ea 100644
--- a/s2graphql/src/main/scala/org/apache/s2graph/graphql/repository/GraphRepository.scala
+++ b/s2graphql/src/main/scala/org/apache/s2graph/graphql/repository/GraphRepository.scala
@@ -92,7 +92,7 @@ class GraphRepository(val graph: S2GraphLike) {
   def getEdges(vertex: S2VertexLike, label: Label, _dir: String): Future[Seq[S2EdgeLike]] = {
     val dir = GraphUtil.directions(_dir)
     val labelWithDir = LabelWithDirection(label.id.get, dir)
-    val step = Step(Seq(QueryParam(labelWithDir)))
+    val step = Step(Seq(QueryParam(labelWithDir).copy(limit = 100)))
     val q = Query(Seq(vertex), steps = Vector(step))
 
     graph.getEdges(q).map(_.edgeWithScores.map(_.edge))