summaryrefslogtreecommitdiffstats
path: root/vespaclient-java/src/main/java/com/yahoo/vespaget/ClientParameters.java
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-12-05 14:15:23 +0100
committerTor Brede Vekterli <vekterli@yahooinc.com>2022-12-05 14:15:23 +0100
commit07c7b270186672af489f910bc09d3824fcf0caf7 (patch)
tree74201ced0b4ee93faa6011c07f7e0cc64bf96b8d /vespaclient-java/src/main/java/com/yahoo/vespaget/ClientParameters.java
parent23e9f20ebc1b0d013bd3f95a9463a9fe92a2cb44 (diff)
Add tensor short form output option to vespa-get
Diffstat (limited to 'vespaclient-java/src/main/java/com/yahoo/vespaget/ClientParameters.java')
-rw-r--r--vespaclient-java/src/main/java/com/yahoo/vespaget/ClientParameters.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/vespaclient-java/src/main/java/com/yahoo/vespaget/ClientParameters.java b/vespaclient-java/src/main/java/com/yahoo/vespaget/ClientParameters.java
index 6102f3da77f..7e464431f9a 100644
--- a/vespaclient-java/src/main/java/com/yahoo/vespaget/ClientParameters.java
+++ b/vespaclient-java/src/main/java/com/yahoo/vespaget/ClientParameters.java
@@ -37,13 +37,15 @@ public class ClientParameters {
public final DocumentProtocol.Priority priority;
// If full documents are printed, they will be printed as JSON (instead of XML)
public final boolean jsonOutput;
+ // Output JSON tensors in short form
+ public final boolean tensorShortForm;
private ClientParameters(
boolean help, Iterator<String> documentIds, boolean printIdsOnly,
String fieldSet, String route, String cluster, String configId,
boolean showDocSize, double timeout, boolean noRetry, int traceLevel,
- DocumentProtocol.Priority priority, boolean jsonOutput) {
+ DocumentProtocol.Priority priority, boolean jsonOutput, boolean tensorShortForm) {
this.help = help;
this.documentIds = documentIds;
@@ -58,6 +60,7 @@ public class ClientParameters {
this.traceLevel = traceLevel;
this.priority = priority;
this.jsonOutput = jsonOutput;
+ this.tensorShortForm = tensorShortForm;
}
public static class Builder {
@@ -74,6 +77,7 @@ public class ClientParameters {
private int traceLevel;
private DocumentProtocol.Priority priority;
private boolean jsonOutput;
+ private boolean tensorShortForm;
public Builder setHelp(boolean help) {
this.help = help;
@@ -140,10 +144,15 @@ public class ClientParameters {
return this;
}
+ public Builder setTensorShortForm(boolean tensorShortForm) {
+ this.tensorShortForm = tensorShortForm;
+ return this;
+ }
+
public ClientParameters build() {
return new ClientParameters(
help, documentIds, printIdsOnly, fieldSet, route, cluster, configId,
- showDocSize, timeout, noRetry, traceLevel, priority, jsonOutput);
+ showDocSize, timeout, noRetry, traceLevel, priority, jsonOutput, tensorShortForm);
}
}