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 2017/07/31 01:05:23 UTC
[09/25] incubator-s2graph git commit: bug fix on variant arguments.
bug fix on variant arguments.
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/4bf77535
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/4bf77535
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/4bf77535
Branch: refs/heads/master
Commit: 4bf775359430f7cea0205dbc37890f914d2ee4d8
Parents: a76dfdc
Author: DO YUNG YOON <st...@apache.org>
Authored: Thu Jul 13 15:43:41 2017 +0900
Committer: DO YUNG YOON <st...@apache.org>
Committed: Thu Jul 13 15:43:41 2017 +0900
----------------------------------------------------------------------
.../apache/s2graph/core/io/tinkerpop/optimize/S2GraphStep.java | 4 ++--
.../main/scala/org/apache/s2graph/core/index/IndexProvider.scala | 4 ++--
.../apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/4bf77535/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphStep.java
----------------------------------------------------------------------
diff --git a/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphStep.java b/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphStep.java
index f2bc6c8..8107dd3 100644
--- a/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphStep.java
+++ b/s2core/src/main/java/org/apache/s2graph/core/io/tinkerpop/optimize/S2GraphStep.java
@@ -68,12 +68,12 @@ public class S2GraphStep<S, E extends Element> extends GraphStep<S, E> {
if (isVertex) {
List<VertexId> ids = graph.indexProvider().fetchVertexIds(queryString);
if (ids.isEmpty()) return (Iterator) graph.vertices();
- else return (Iterator) graph.vertices(ids);
+ else return (Iterator) graph.vertices(ids.toArray());
}
else {
List<EdgeId> ids = graph.indexProvider().fetchEdgeIds(queryString);
if (ids.isEmpty()) return (Iterator) graph.edges();
- else return (Iterator) graph.edges(ids);
+ else return (Iterator) graph.edges(ids.toArray());
}
});
}
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/4bf77535/s2core/src/main/scala/org/apache/s2graph/core/index/IndexProvider.scala
----------------------------------------------------------------------
diff --git a/s2core/src/main/scala/org/apache/s2graph/core/index/IndexProvider.scala b/s2core/src/main/scala/org/apache/s2graph/core/index/IndexProvider.scala
index b0d2a4b..7152449 100644
--- a/s2core/src/main/scala/org/apache/s2graph/core/index/IndexProvider.scala
+++ b/s2core/src/main/scala/org/apache/s2graph/core/index/IndexProvider.scala
@@ -100,7 +100,7 @@ class LuceneIndexProvider(config: Config) extends IndexProvider {
docs.scoreDocs.foreach { scoreDoc =>
val document = searcher.doc(scoreDoc.doc)
val id = Conversions.s2EdgeIdReads.reads(Json.parse(document.get(field))).get
-// ids.add(id);
+ ids.add(id);
}
reader.close()
@@ -120,7 +120,7 @@ class LuceneIndexProvider(config: Config) extends IndexProvider {
docs.scoreDocs.foreach { scoreDoc =>
val document = searcher.doc(scoreDoc.doc)
val id = Conversions.s2VertexIdReads.reads(Json.parse(document.get(field))).get
-// ids.add(id)
+ ids.add(id)
}
reader.close()
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/4bf77535/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala
----------------------------------------------------------------------
diff --git a/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala b/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala
index 63badc0..a72b562 100644
--- a/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala
+++ b/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala
@@ -468,7 +468,7 @@ class S2GraphTest extends FunSuite with Matchers with TestCommonWithModels {
val l = ls.toList
println(s"[Size]: ${l.size}")
println(l.toArray.toSeq.mkString("\n"))
- println(ls.toList)
+
ls
}
}
\ No newline at end of file