summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java2
-rw-r--r--container-search/src/main/java/com/yahoo/search/rendering/JsonRenderer.java6
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java4
3 files changed, 7 insertions, 5 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java b/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java
index f6e158cf04a..160a039fe2d 100644
--- a/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java
+++ b/container-search/src/main/java/com/yahoo/search/query/properties/QueryProperties.java
@@ -300,7 +300,7 @@ public class QueryProperties extends Properties {
}
else if (key.size() == 3 && key.get(1).equals(Presentation.FORMAT)) {
if (key.last().equals(Presentation.TENSORS))
- query.getPresentation().setTensorShortForm(asString(value, ""));
+ query.getPresentation().setTensorShortForm(asString(value, "short"));
else
throwIllegalParameter(key.last(), Presentation.FORMAT);
}
diff --git a/container-search/src/main/java/com/yahoo/search/rendering/JsonRenderer.java b/container-search/src/main/java/com/yahoo/search/rendering/JsonRenderer.java
index 58353cc5907..4f55b9946a8 100644
--- a/container-search/src/main/java/com/yahoo/search/rendering/JsonRenderer.java
+++ b/container-search/src/main/java/com/yahoo/search/rendering/JsonRenderer.java
@@ -124,13 +124,14 @@ public class JsonRenderer extends AsynchronousSectionedRenderer<Result> {
private volatile JsonGenerator generator;
private volatile FieldConsumer fieldConsumer;
private volatile Deque<Integer> renderedChildren;
+
static class FieldConsumerSettings {
volatile boolean debugRendering = false;
volatile boolean jsonDeepMaps = true;
volatile boolean jsonWsets = true;
volatile boolean jsonMapsAll = true;
volatile boolean jsonWsetsAll = false;
- volatile boolean tensorShortForm = false;
+ volatile boolean tensorShortForm = true;
boolean convertDeep() { return (jsonDeepMaps || jsonWsets); }
void init() {
this.debugRendering = false;
@@ -138,7 +139,7 @@ public class JsonRenderer extends AsynchronousSectionedRenderer<Result> {
this.jsonWsets = true;
this.jsonMapsAll = true;
this.jsonWsetsAll = true;
- this.tensorShortForm = false;
+ this.tensorShortForm = true;
}
void getSettings(Query q) {
if (q == null) {
@@ -155,6 +156,7 @@ public class JsonRenderer extends AsynchronousSectionedRenderer<Result> {
this.tensorShortForm = q.getPresentation().getTensorShortForm();
}
}
+
private volatile FieldConsumerSettings fieldConsumerSettings;
private volatile LongSupplier timeSource;
private volatile OutputStream stream;
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java b/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java
index 92bdfb2b3a4..342aca5fb3d 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java
@@ -225,8 +225,8 @@ public abstract class TensorAddress implements Comparable<TensorAddress> {
void validate() {
for (int i = 0; i < labels.length; i++)
if (labels[i] == null)
- throw new IllegalArgumentException("Missing a label for dimension " +
- type.dimensions().get(i).name() + " for " + type);
+ throw new IllegalArgumentException("Missing a label for dimension '" +
+ type.dimensions().get(i).name() + "' for " + type);
}
public TensorAddress build() {