aboutsummaryrefslogtreecommitdiffstats
path: root/client/src/main
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-11-02 11:15:34 +0100
committerJon Bratseth <bratseth@gmail.com>2022-11-02 11:15:34 +0100
commitcecee424eb283929296a0933351d5488a4528ef1 (patch)
tree3422c21ee97503a2171723e5ac632e967f55f1d0 /client/src/main
parent933f874a3a8d10bad01f07942a65d25165d4fcfa (diff)
Don't output square brackets or semicolon
Diffstat (limited to 'client/src/main')
-rw-r--r--client/src/main/java/ai/vespa/client/dsl/EndQuery.java2
-rw-r--r--client/src/main/java/ai/vespa/client/dsl/FixedQuery.java1
-rw-r--r--client/src/main/java/ai/vespa/client/dsl/Wand.java2
-rw-r--r--client/src/main/java/ai/vespa/client/dsl/WeakAnd.java2
4 files changed, 3 insertions, 4 deletions
diff --git a/client/src/main/java/ai/vespa/client/dsl/EndQuery.java b/client/src/main/java/ai/vespa/client/dsl/EndQuery.java
index 1550186342e..d1d4b6eb883 100644
--- a/client/src/main/java/ai/vespa/client/dsl/EndQuery.java
+++ b/client/src/main/java/ai/vespa/client/dsl/EndQuery.java
@@ -169,7 +169,7 @@ public class EndQuery {
StringBuilder sb = new StringBuilder();
String orderStr = order.stream().map(array -> A.empty().equals(array[0])
? Text.format("%s %s", array[1], array[2])
- : Text.format("[%s]%s %s", array[0], array[1], array[2]))
+ : Text.format("%s%s %s", array[0], array[1], array[2]))
.collect(Collectors.joining(", "));
String others = map.entrySet().stream()
diff --git a/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java b/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java
index c7b843f1988..b8fc3094937 100644
--- a/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java
+++ b/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java
@@ -353,7 +353,6 @@ public class FixedQuery {
if (!"".equals(endQuery.toString())) {
sb.append(' ').append(endQuery);
}
- sb.append(";");
queryMap = new LinkedHashMap<>(); // for the order
queryMap.put("yql", sb.toString());
diff --git a/client/src/main/java/ai/vespa/client/dsl/Wand.java b/client/src/main/java/ai/vespa/client/dsl/Wand.java
index 56bf3e3cf1d..df89d235139 100644
--- a/client/src/main/java/ai/vespa/client/dsl/Wand.java
+++ b/client/src/main/java/ai/vespa/client/dsl/Wand.java
@@ -66,7 +66,7 @@ public class Wand extends QueryChain {
public String toString() {
boolean hasAnnotation = A.hasAnnotation(annotation);
String s = Text.format("wand(%s, %s)", fieldName, Q.toJson(value));
- return hasAnnotation ? Text.format("([%s]%s)", annotation, s) : s;
+ return hasAnnotation ? Text.format("(%s%s)", annotation, s) : s;
}
}
diff --git a/client/src/main/java/ai/vespa/client/dsl/WeakAnd.java b/client/src/main/java/ai/vespa/client/dsl/WeakAnd.java
index 45a616b5a8a..1e0ea8ad700 100644
--- a/client/src/main/java/ai/vespa/client/dsl/WeakAnd.java
+++ b/client/src/main/java/ai/vespa/client/dsl/WeakAnd.java
@@ -54,7 +54,7 @@ public class WeakAnd extends QueryChain {
s =
Text.format("weakAnd(%s)",
value.queries.stream().map(Object::toString).collect(Collectors.joining(", ")));
- return hasAnnotation ? Text.format("([%s]%s)", annotation, s) : s;
+ return hasAnnotation ? Text.format("(%s%s)", annotation, s) : s;
}
} \ No newline at end of file