summaryrefslogtreecommitdiffstats
path: root/config-model/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test')
-rw-r--r--config-model/src/test/derived/attributeprefetch/attributeprefetch.sd6
-rw-r--r--config-model/src/test/derived/attributeprefetch/attributes.cfg64
-rw-r--r--config-model/src/test/derived/attributeprefetch/documentmanager.cfg26
-rw-r--r--config-model/src/test/derived/attributeprefetch/ilscripts.cfg4
-rw-r--r--config-model/src/test/derived/attributeprefetch/index-info.cfg20
-rw-r--r--config-model/src/test/derived/attributes/attributes.cfg2
-rw-r--r--config-model/src/test/derived/attributes/attributes.sd2
-rw-r--r--config-model/src/test/derived/attributes/index-info.cfg2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java60
10 files changed, 69 insertions, 119 deletions
diff --git a/config-model/src/test/derived/attributeprefetch/attributeprefetch.sd b/config-model/src/test/derived/attributeprefetch/attributeprefetch.sd
index e778c590aac..296a1fd828d 100644
--- a/config-model/src/test/derived/attributeprefetch/attributeprefetch.sd
+++ b/config-model/src/test/derived/attributeprefetch/attributeprefetch.sd
@@ -34,18 +34,12 @@ search prefetch {
field multifloat type array<float> {
indexing: attribute
}
- field wsfloat type weightedset<float> {
- indexing: attribute
- }
field singledouble type double {
indexing: attribute
}
field multidouble type array<double> {
indexing: attribute
}
- field wsdouble type weightedset<double> {
- indexing: attribute
- }
field singlestring type string {
indexing: attribute
match {
diff --git a/config-model/src/test/derived/attributeprefetch/attributes.cfg b/config-model/src/test/derived/attributeprefetch/attributes.cfg
index b6f37a216a7..8b49dc1dc23 100644
--- a/config-model/src/test/derived/attributeprefetch/attributes.cfg
+++ b/config-model/src/test/derived/attributeprefetch/attributes.cfg
@@ -350,38 +350,6 @@ attribute[].index.hnsw.maxlinkspernode 16
attribute[].index.hnsw.neighborstoexploreatinsert 200
attribute[].index.hnsw.distancemetric EUCLIDEAN
attribute[].index.hnsw.multithreadedindexing true
-attribute[].name "wsfloat"
-attribute[].datatype FLOAT
-attribute[].collectiontype WEIGHTEDSET
-attribute[].dictionary.type BTREE
-attribute[].dictionary.match UNCASED
-attribute[].match UNCASED
-attribute[].removeifzero false
-attribute[].createifnonexistent false
-attribute[].fastsearch false
-attribute[].huge false
-attribute[].paged false
-attribute[].ismutable false
-attribute[].sortascending true
-attribute[].sortfunction UCA
-attribute[].sortstrength PRIMARY
-attribute[].sortlocale ""
-attribute[].enablebitvectors false
-attribute[].enableonlybitvector false
-attribute[].fastaccess false
-attribute[].arity 8
-attribute[].lowerbound -9223372036854775808
-attribute[].upperbound 9223372036854775807
-attribute[].densepostinglistthreshold 0.4
-attribute[].tensortype ""
-attribute[].imported false
-attribute[].maxuncommittedmemory 77777
-attribute[].distancemetric EUCLIDEAN
-attribute[].index.hnsw.enabled false
-attribute[].index.hnsw.maxlinkspernode 16
-attribute[].index.hnsw.neighborstoexploreatinsert 200
-attribute[].index.hnsw.distancemetric EUCLIDEAN
-attribute[].index.hnsw.multithreadedindexing true
attribute[].name "singledouble"
attribute[].datatype DOUBLE
attribute[].collectiontype SINGLE
@@ -446,38 +414,6 @@ attribute[].index.hnsw.maxlinkspernode 16
attribute[].index.hnsw.neighborstoexploreatinsert 200
attribute[].index.hnsw.distancemetric EUCLIDEAN
attribute[].index.hnsw.multithreadedindexing true
-attribute[].name "wsdouble"
-attribute[].datatype DOUBLE
-attribute[].collectiontype WEIGHTEDSET
-attribute[].dictionary.type BTREE
-attribute[].dictionary.match UNCASED
-attribute[].match UNCASED
-attribute[].removeifzero false
-attribute[].createifnonexistent false
-attribute[].fastsearch false
-attribute[].huge false
-attribute[].paged false
-attribute[].ismutable false
-attribute[].sortascending true
-attribute[].sortfunction UCA
-attribute[].sortstrength PRIMARY
-attribute[].sortlocale ""
-attribute[].enablebitvectors false
-attribute[].enableonlybitvector false
-attribute[].fastaccess false
-attribute[].arity 8
-attribute[].lowerbound -9223372036854775808
-attribute[].upperbound 9223372036854775807
-attribute[].densepostinglistthreshold 0.4
-attribute[].tensortype ""
-attribute[].imported false
-attribute[].maxuncommittedmemory 77777
-attribute[].distancemetric EUCLIDEAN
-attribute[].index.hnsw.enabled false
-attribute[].index.hnsw.maxlinkspernode 16
-attribute[].index.hnsw.neighborstoexploreatinsert 200
-attribute[].index.hnsw.distancemetric EUCLIDEAN
-attribute[].index.hnsw.multithreadedindexing true
attribute[].name "singlestring"
attribute[].datatype STRING
attribute[].collectiontype SINGLE
diff --git a/config-model/src/test/derived/attributeprefetch/documentmanager.cfg b/config-model/src/test/derived/attributeprefetch/documentmanager.cfg
index 373e0211253..9d91ad3f5ab 100644
--- a/config-model/src/test/derived/attributeprefetch/documentmanager.cfg
+++ b/config-model/src/test/derived/attributeprefetch/documentmanager.cfg
@@ -56,8 +56,6 @@ doctype[].fieldsets{[document]}.fields[] "singleint"
doctype[].fieldsets{[document]}.fields[] "singlelong"
doctype[].fieldsets{[document]}.fields[] "singlestring"
doctype[].fieldsets{[document]}.fields[] "wsbyte"
-doctype[].fieldsets{[document]}.fields[] "wsdouble"
-doctype[].fieldsets{[document]}.fields[] "wsfloat"
doctype[].fieldsets{[document]}.fields[] "wsint"
doctype[].fieldsets{[document]}.fields[] "wslong"
doctype[].fieldsets{[document]}.fields[] "wsstring"
@@ -69,9 +67,9 @@ doctype[].arraytype[].idx 10021
doctype[].arraytype[].elementtype 10008
doctype[].arraytype[].idx 10023
doctype[].arraytype[].elementtype 10005
-doctype[].arraytype[].idx 10025
+doctype[].arraytype[].idx 10024
doctype[].arraytype[].elementtype 10004
-doctype[].arraytype[].idx 10027
+doctype[].arraytype[].idx 10025
doctype[].arraytype[].elementtype 10012
doctype[].wsettype[].idx 10018
doctype[].wsettype[].elementtype 10003
@@ -85,15 +83,7 @@ doctype[].wsettype[].idx 10022
doctype[].wsettype[].elementtype 10008
doctype[].wsettype[].createifnonexistent false
doctype[].wsettype[].removeifzero false
-doctype[].wsettype[].idx 10024
-doctype[].wsettype[].elementtype 10005
-doctype[].wsettype[].createifnonexistent false
-doctype[].wsettype[].removeifzero false
doctype[].wsettype[].idx 10026
-doctype[].wsettype[].elementtype 10004
-doctype[].wsettype[].createifnonexistent false
-doctype[].wsettype[].removeifzero false
-doctype[].wsettype[].idx 10028
doctype[].wsettype[].elementtype 10012
doctype[].wsettype[].createifnonexistent false
doctype[].wsettype[].removeifzero false
@@ -132,24 +122,18 @@ doctype[].structtype[].field[].type 10005
doctype[].structtype[].field[].name "multifloat"
doctype[].structtype[].field[].internalid 1028626753
doctype[].structtype[].field[].type 10023
-doctype[].structtype[].field[].name "wsfloat"
-doctype[].structtype[].field[].internalid 2087992058
-doctype[].structtype[].field[].type 10024
doctype[].structtype[].field[].name "singledouble"
doctype[].structtype[].field[].internalid 1982688634
doctype[].structtype[].field[].type 10004
doctype[].structtype[].field[].name "multidouble"
doctype[].structtype[].field[].internalid 1316159002
-doctype[].structtype[].field[].type 10025
-doctype[].structtype[].field[].name "wsdouble"
-doctype[].structtype[].field[].internalid 995331392
-doctype[].structtype[].field[].type 10026
+doctype[].structtype[].field[].type 10024
doctype[].structtype[].field[].name "singlestring"
doctype[].structtype[].field[].internalid 289408547
doctype[].structtype[].field[].type 10012
doctype[].structtype[].field[].name "multistring"
doctype[].structtype[].field[].internalid 862051908
-doctype[].structtype[].field[].type 10027
+doctype[].structtype[].field[].type 10025
doctype[].structtype[].field[].name "wsstring"
doctype[].structtype[].field[].internalid 447961272
-doctype[].structtype[].field[].type 10028
+doctype[].structtype[].field[].type 10026
diff --git a/config-model/src/test/derived/attributeprefetch/ilscripts.cfg b/config-model/src/test/derived/attributeprefetch/ilscripts.cfg
index 61f4cde6e66..771a54359b9 100644
--- a/config-model/src/test/derived/attributeprefetch/ilscripts.cfg
+++ b/config-model/src/test/derived/attributeprefetch/ilscripts.cfg
@@ -12,10 +12,8 @@ ilscript[].docfield[] "multilong"
ilscript[].docfield[] "wslong"
ilscript[].docfield[] "singlefloat"
ilscript[].docfield[] "multifloat"
-ilscript[].docfield[] "wsfloat"
ilscript[].docfield[] "singledouble"
ilscript[].docfield[] "multidouble"
-ilscript[].docfield[] "wsdouble"
ilscript[].docfield[] "singlestring"
ilscript[].docfield[] "multistring"
ilscript[].docfield[] "wsstring"
@@ -30,10 +28,8 @@ ilscript[].content[] "clear_state | guard { input multilong | attribute multilon
ilscript[].content[] "clear_state | guard { input wslong | attribute wslong; }"
ilscript[].content[] "clear_state | guard { input singlefloat | attribute singlefloat; }"
ilscript[].content[] "clear_state | guard { input multifloat | attribute multifloat; }"
-ilscript[].content[] "clear_state | guard { input wsfloat | attribute wsfloat; }"
ilscript[].content[] "clear_state | guard { input singledouble | attribute singledouble; }"
ilscript[].content[] "clear_state | guard { input multidouble | attribute multidouble; }"
-ilscript[].content[] "clear_state | guard { input wsdouble | attribute wsdouble; }"
ilscript[].content[] "clear_state | guard { input singlestring | attribute singlestring; }"
ilscript[].content[] "clear_state | guard { input multistring | attribute multistring; }"
ilscript[].content[] "clear_state | guard { input wsstring | attribute wsstring; }"
diff --git a/config-model/src/test/derived/attributeprefetch/index-info.cfg b/config-model/src/test/derived/attributeprefetch/index-info.cfg
index e1b20b33e17..28e669d3571 100644
--- a/config-model/src/test/derived/attributeprefetch/index-info.cfg
+++ b/config-model/src/test/derived/attributeprefetch/index-info.cfg
@@ -105,16 +105,6 @@ indexinfo[].command[].indexname "multifloat"
indexinfo[].command[].command "numerical"
indexinfo[].command[].indexname "multifloat"
indexinfo[].command[].command "type Array<float>"
-indexinfo[].command[].indexname "wsfloat"
-indexinfo[].command[].command "index"
-indexinfo[].command[].indexname "wsfloat"
-indexinfo[].command[].command "multivalue"
-indexinfo[].command[].indexname "wsfloat"
-indexinfo[].command[].command "attribute"
-indexinfo[].command[].indexname "wsfloat"
-indexinfo[].command[].command "numerical"
-indexinfo[].command[].indexname "wsfloat"
-indexinfo[].command[].command "type WeightedSet<float>"
indexinfo[].command[].indexname "singledouble"
indexinfo[].command[].command "index"
indexinfo[].command[].indexname "singledouble"
@@ -133,16 +123,6 @@ indexinfo[].command[].indexname "multidouble"
indexinfo[].command[].command "numerical"
indexinfo[].command[].indexname "multidouble"
indexinfo[].command[].command "type Array<double>"
-indexinfo[].command[].indexname "wsdouble"
-indexinfo[].command[].command "index"
-indexinfo[].command[].indexname "wsdouble"
-indexinfo[].command[].command "multivalue"
-indexinfo[].command[].indexname "wsdouble"
-indexinfo[].command[].command "attribute"
-indexinfo[].command[].indexname "wsdouble"
-indexinfo[].command[].command "numerical"
-indexinfo[].command[].indexname "wsdouble"
-indexinfo[].command[].command "type WeightedSet<double>"
indexinfo[].command[].indexname "singlestring"
indexinfo[].command[].command "index"
indexinfo[].command[].indexname "singlestring"
diff --git a/config-model/src/test/derived/attributes/attributes.cfg b/config-model/src/test/derived/attributes/attributes.cfg
index cbc3280f213..cf473ad4854 100644
--- a/config-model/src/test/derived/attributes/attributes.cfg
+++ b/config-model/src/test/derived/attributes/attributes.cfg
@@ -351,7 +351,7 @@ attribute[].index.hnsw.neighborstoexploreatinsert 200
attribute[].index.hnsw.distancemetric EUCLIDEAN
attribute[].index.hnsw.multithreadedindexing true
attribute[].name "b7"
-attribute[].datatype DOUBLE
+attribute[].datatype INT32
attribute[].collectiontype WEIGHTEDSET
attribute[].dictionary.type BTREE
attribute[].dictionary.match UNCASED
diff --git a/config-model/src/test/derived/attributes/attributes.sd b/config-model/src/test/derived/attributes/attributes.sd
index f38087fbc6f..df647c833f4 100644
--- a/config-model/src/test/derived/attributes/attributes.sd
+++ b/config-model/src/test/derived/attributes/attributes.sd
@@ -74,7 +74,7 @@ search attributes {
field b6 type array<long> {
indexing: summary | attribute
}
- field b7 type weightedset<double> {
+ field b7 type weightedset<int> {
indexing: summary | attribute
}
diff --git a/config-model/src/test/derived/attributes/index-info.cfg b/config-model/src/test/derived/attributes/index-info.cfg
index 9aeb79a7e2d..560da741ad9 100644
--- a/config-model/src/test/derived/attributes/index-info.cfg
+++ b/config-model/src/test/derived/attributes/index-info.cfg
@@ -132,7 +132,7 @@ indexinfo[].command[].command "attribute"
indexinfo[].command[].indexname "b7"
indexinfo[].command[].command "numerical"
indexinfo[].command[].indexname "b7"
-indexinfo[].command[].command "type WeightedSet<double>"
+indexinfo[].command[].command "type WeightedSet<int>"
indexinfo[].command[].indexname "a9"
indexinfo[].command[].command "index"
indexinfo[].command[].indexname "a9"
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java
index c71fd3dd489..e3ac5da8955 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/TensorTransformTestCase.java
@@ -150,7 +150,7 @@ public class TensorTransformTestCase extends AbstractSchemaTestCase {
" field double_array_field type array<double> { \n" +
" indexing: summary | attribute \n" +
" }\n" +
- " field weightedset_field type weightedset<double> { \n" +
+ " field weightedset_field type weightedset<int> { \n" +
" indexing: summary | attribute \n" +
" }\n" +
" field tensor_field_1 type tensor(x{}) { \n" +
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java
index 2cdd6521661..3cff04198bd 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/search/test/DocumentDatabaseTestCase.java
@@ -4,6 +4,7 @@ package com.yahoo.vespa.model.search.test;
import com.google.common.collect.ImmutableMap;
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.model.deploy.TestProperties;
+import com.yahoo.search.config.SchemaInfoConfig;
import com.yahoo.vespa.config.search.IndexschemaConfig;
import com.yahoo.vespa.config.search.core.ProtonConfig;
import com.yahoo.vespa.config.search.RankProfilesConfig;
@@ -344,6 +345,53 @@ public class DocumentDatabaseTestCase {
}
}
+ /** Schema-info should contain all schemas, independent of clusters. */
+ @Test
+ public void requireThatSchemaInfoIsAvailable() {
+ List<String> schemas = Arrays.asList("type1", "type2");
+ VespaModel model = new VespaModelCreatorWithMockPkg(vespaHosts, createVespaServices(schemas, "index"),
+ ApplicationPackageUtils.generateSchemas(schemas)).create();
+ assertSchemaInfo("container/searchchains/chain/test/component/com.yahoo.prelude.cluster.ClusterSearcher", model);
+ assertSchemaInfo("container", model);
+ }
+
+ private void assertSchemaInfo(String configId, VespaModel model) {
+ { // schema-info config
+ SchemaInfoConfig dcfg = model.getConfig(SchemaInfoConfig.class, configId);
+ assertEquals(2, dcfg.schema().size());
+
+ { // type1
+ SchemaInfoConfig.Schema schema = dcfg.schema(0);
+ assertEquals("type1", schema.name());
+
+ assertEquals(7, schema.rankprofile().size());
+ assertRankProfile(schema, 0, "default", false, false);
+ assertRankProfile(schema, 1, "unranked", false, false);
+ assertRankProfile(schema, 2, "staticrank", false, false);
+ assertRankProfile(schema, 3, "summaryfeatures", true, false);
+ assertRankProfile(schema, 4, "inheritedsummaryfeatures", true, false);
+ assertRankProfile(schema, 5, "rankfeatures", false, true);
+ var inputs = assertRankProfile(schema, 6, "inputs", false, false);
+
+ assertEquals(2, inputs.input().size());
+ assertEquals("query(foo)", inputs.input(0).name());
+ assertEquals("tensor<float>(x[10])", inputs.input(0).type());
+ assertEquals("query(bar)", inputs.input(1).name());
+ assertEquals("tensor(key{},x[1000])", inputs.input(1).type());
+
+ // assertEquals(2, schema.summaryclass().size());
+ // assertEquals("default", schema.summaryclass(0).name());
+ // assertEquals("attributeprefetch", schema.summaryclass(1).name());
+ // assertSummaryField(schema, 0, 0, "f1", "longstring", true);
+ // assertSummaryField(schema, 0, 1, "f2", "integer", false);
+ }
+ { // type2
+ SchemaInfoConfig.Schema schema = dcfg.schema(1);
+ assertEquals("type2", schema.name());
+ }
+ }
+ }
+
private DocumentdbInfoConfig.Documentdb.Rankprofile assertRankProfile(DocumentdbInfoConfig.Documentdb db,
int index,
String name,
@@ -356,6 +404,18 @@ public class DocumentDatabaseTestCase {
return rankProfile;
}
+ private SchemaInfoConfig.Schema.Rankprofile assertRankProfile(SchemaInfoConfig.Schema schema,
+ int index,
+ String name,
+ boolean hasSummaryFeatures,
+ boolean hasRankFeatures) {
+ SchemaInfoConfig.Schema.Rankprofile rankProfile = schema.rankprofile(index);
+ assertEquals(name, rankProfile.name());
+ assertEquals(hasSummaryFeatures, rankProfile.hasSummaryFeatures());
+ assertEquals(hasRankFeatures, rankProfile.hasRankFeatures());
+ return rankProfile;
+ }
+
private void assertSummaryField(DocumentdbInfoConfig.Documentdb db, int summaryClassIndex, int fieldIndex,
String name, String type, boolean dynamic) {
DocumentdbInfoConfig.Documentdb.Summaryclass.Fields field = db.summaryclass(summaryClassIndex).fields(fieldIndex);