diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/AbstractSerializer.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/AbstractSerializer.java index 509507f876..2ca1305bc0 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/AbstractSerializer.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/AbstractSerializer.java @@ -66,7 +66,7 @@ public Query writeQuery(Query query) { for (Id id : query.ids()) { result.query(this.writeQueryId(type, id)); } - return result; + query = result; } // Serialize condition(key/value) in query diff --git a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinarySerializer.java b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinarySerializer.java index 125ede5cbd..c29d2e6f6e 100644 --- a/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinarySerializer.java +++ b/hugegraph-core/src/main/java/com/baidu/hugegraph/backend/serializer/BinarySerializer.java @@ -581,7 +581,7 @@ private Query writeQueryEdgePrefixCondition(ConditionQuery cq) { buffer.writeId((Id) value); } else if (key == HugeKeys.SORT_VALUES) { assert value instanceof String; - buffer.writeStringRaw((String) value); + buffer.writeStringWithEnding((String) value); } else { assert false : key; } diff --git a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example1.java b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example1.java index 2dd69fbb6e..975451f140 100644 --- a/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example1.java +++ b/hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example1.java @@ -452,8 +452,6 @@ public static void testLeftIndexProcess(final HugeGraph graph) { // test for process left index when addVertex to override prior vertex graph.schema().indexLabel("personByCityAndAge").by("city", "age") .onV("person").ifNotExist().create(); - graph.schema().indexLabel("personByAgeSecond").by("age") - .onV("person").secondary().ifNotExist().create(); ExampleUtil.waitAllTaskDone(graph);