summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorArne H Juul <arnej27959@users.noreply.github.com>2022-03-08 18:09:08 +0100
committerGitHub <noreply@github.com>2022-03-08 18:09:08 +0100
commit8048ece519673f4da655160a53d9e40b01800779 (patch)
tree642de2500eabeb1a386af20a13e9342e638834db /config-model
parent13ab9df084ddc55c1deb4c012fd7b96c937fb318 (diff)
parent4b798440baad23420c2f1cd853a47f9e2d9f8f5d (diff)
Merge pull request #21594 from vespa-engine/arnej/regular-type-query-commands
Arnej/regular type query commands
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java5
-rw-r--r--config-model/src/test/derived/types/index-info.cfg4
2 files changed, 7 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java
index d9bdf5dc917..0d1222e737b 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java
@@ -9,6 +9,7 @@ import com.yahoo.document.MapDataType;
import com.yahoo.document.StructDataType;
import com.yahoo.document.TemporaryStructuredDataType;
import com.yahoo.document.TensorDataType;
+import com.yahoo.document.WeightedSetDataType;
import com.yahoo.language.Linguistics;
import com.yahoo.language.process.Embedder;
import com.yahoo.language.simple.SimpleLinguistics;
@@ -186,6 +187,10 @@ public class SDField extends Field implements TypedKey, FieldOperationContainer,
": Dense tensor dimensions must have a size");
addQueryCommand("type " + type);
}
+ else if (dataType instanceof WeightedSetDataType) {
+ var nested = ((WeightedSetDataType) dataType).getNestedType().getName();
+ addQueryCommand("type WeightedSet<" + nested + ">");
+ }
else {
addQueryCommand("type " + dataType.getName());
}
diff --git a/config-model/src/test/derived/types/index-info.cfg b/config-model/src/test/derived/types/index-info.cfg
index 2db4ead180b..7f43cd67a6b 100644
--- a/config-model/src/test/derived/types/index-info.cfg
+++ b/config-model/src/test/derived/types/index-info.cfg
@@ -96,7 +96,7 @@ indexinfo[].command[].command "multivalue"
indexinfo[].command[].indexname "tagfield"
indexinfo[].command[].command "attribute"
indexinfo[].command[].indexname "tagfield"
-indexinfo[].command[].command "type tag"
+indexinfo[].command[].command "type WeightedSet<string>"
indexinfo[].command[].indexname "structfield.s1"
indexinfo[].command[].command "index"
indexinfo[].command[].indexname "structfield.s1"
@@ -704,4 +704,4 @@ indexinfo[].command[].command "index"
indexinfo[].command[].indexname "pst_sta_boldingoff_nomatch_tag_01"
indexinfo[].command[].command "multivalue"
indexinfo[].command[].indexname "pst_sta_boldingoff_nomatch_tag_01"
-indexinfo[].command[].command "type tag"
+indexinfo[].command[].command "type WeightedSet<string>"