summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-11-02 10:46:25 +0100
committerJon Bratseth <bratseth@gmail.com>2022-11-02 10:46:25 +0100
commit349e575f85448b66789cdf42444b7779460970a0 (patch)
tree3fa015dc66becd092575ad5d145cc41ef1016520 /client
parent7a59ce6135b654c45f29606dd45a5e4688d761c0 (diff)
Simplify - index is not needed
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/ai/vespa/client/dsl/FixedQuery.java19
-rw-r--r--client/src/main/java/ai/vespa/client/dsl/QueryChain.java5
2 files changed, 0 insertions, 24 deletions
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 d957217a9c7..c7b843f1988 100644
--- a/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java
+++ b/client/src/main/java/ai/vespa/client/dsl/FixedQuery.java
@@ -332,7 +332,6 @@ public class FixedQuery {
return this;
}
-
/**
* build the query map from the query
*
@@ -342,7 +341,6 @@ public class FixedQuery {
if (queryMap != null) {
return queryMap;
}
- assignIndex();
StringBuilder sb = new StringBuilder();
sb.append("select ")
@@ -374,23 +372,6 @@ public class FixedQuery {
.collect(Collectors.joining("&"));
}
- private void assignIndex() {
- assignIndex(endQuery.queryChain.getQuery(), new AtomicInteger());
- }
-
- private void assignIndex(QueryChain q, AtomicInteger ai) {
- q.setIndex(ai.incrementAndGet());
- if (q instanceof Query) {
- assignIndex((Query) q, ai);
- }
- }
-
- private void assignIndex(Query q, AtomicInteger ai) {
- q.queries.stream()
- .filter(QueryChain::nonEmpty)
- .forEach(qu -> assignIndex(qu, ai));
- }
-
private Map<String, String> getUserInputs() {
return getUserInputs(endQuery.queryChain.getQuery());
}
diff --git a/client/src/main/java/ai/vespa/client/dsl/QueryChain.java b/client/src/main/java/ai/vespa/client/dsl/QueryChain.java
index 31b5220e871..58b1563a222 100644
--- a/client/src/main/java/ai/vespa/client/dsl/QueryChain.java
+++ b/client/src/main/java/ai/vespa/client/dsl/QueryChain.java
@@ -4,7 +4,6 @@ package ai.vespa.client.dsl;
public abstract class QueryChain {
String op;
- int index; // for distinct each query chain
Sources sources;
Select select;
Query query;
@@ -18,10 +17,6 @@ public abstract class QueryChain {
return op;
}
- void setIndex(int index) {
- this.index = index;
- }
-
Sources getSources() {
return sources;
}