summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/searchdefinition
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition')
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java12
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSearchFieldsTestCase.java20
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java2
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/VespaMlModelTestCase.java2
5 files changed, 9 insertions, 29 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java
index 3331bf4cdba..9942b563297 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/FieldOfTypeDocumentTestCase.java
@@ -33,7 +33,7 @@ public class FieldOfTypeDocumentTestCase extends SearchDefinitionTestCase {
DocumentType musicType = manager.getDocumentType("music");
- assertEquals(5, musicType.getFieldCount());
+ assertEquals(3, musicType.getFieldCount());
Field intField = musicType.getField("intfield");
assertEquals(DataType.INT, intField.getDataType());
@@ -41,21 +41,13 @@ public class FieldOfTypeDocumentTestCase extends SearchDefinitionTestCase {
assertEquals(DataType.STRING, stringField.getDataType());
Field longField = musicType.getField("longfield");
assertEquals(DataType.LONG, longField.getDataType());
- Field summaryfeatures = musicType.getField("summaryfeatures");
- assertEquals(DataType.STRING, summaryfeatures.getDataType());
- Field rankfeatures = musicType.getField("rankfeatures");
- assertEquals(DataType.STRING, rankfeatures.getDataType());
DocumentType bookType = manager.getDocumentType("book");
- assertEquals(3, bookType.getFieldCount());
+ assertEquals(1, bookType.getFieldCount());
Field musicField = bookType.getField("soundtrack");
assertSame(musicType, musicField.getDataType());
- summaryfeatures = musicType.getField("summaryfeatures");
- assertEquals(DataType.STRING, summaryfeatures.getDataType());
- rankfeatures = musicType.getField("rankfeatures");
- assertEquals(DataType.STRING, rankfeatures.getDataType());
}
}
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java
index 89e551fa789..a94c8e76684 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/SearchImporterTestCase.java
@@ -45,7 +45,7 @@ public class SearchImporterTestCase extends SearchDefinitionTestCase {
SDDocumentType document = search.getDocument();
assertEquals("simple", document.getName());
- assertEquals(25, document.getFieldCount());
+ assertEquals(23, document.getFieldCount());
SDField field;
Attribute attribute;
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSearchFieldsTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSearchFieldsTestCase.java
index b66105009cd..52c36ca240c 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSearchFieldsTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitSearchFieldsTestCase.java
@@ -25,11 +25,9 @@ public class ImplicitSearchFieldsTestCase extends SearchDefinitionTestCase {
SDDocumentType docType = search.getDocument();
assertNotNull(docType);
- assertNotNull(docType.getField("rankfeatures"));
- assertNotNull(docType.getField("summaryfeatures"));
assertNotNull(docType.getField("foo"));
assertNotNull(docType.getField("bar"));
- assertEquals(4, docType.getFieldCount());
+ assertEquals(2, docType.getFieldCount());
}
@Test
@@ -39,12 +37,10 @@ public class ImplicitSearchFieldsTestCase extends SearchDefinitionTestCase {
SDDocumentType docType = search.getDocument();
assertNotNull(docType);
- assertNotNull(docType.getField("rankfeatures"));
- assertNotNull(docType.getField("summaryfeatures"));
assertNotNull(docType.getField("foo"));
assertNotNull(docType.getField("bar"));
assertNotNull(docType.getField("cox"));
- assertEquals(5, docType.getFieldCount());
+ assertEquals(3, docType.getFieldCount());
}
@Test
@@ -54,13 +50,11 @@ public class ImplicitSearchFieldsTestCase extends SearchDefinitionTestCase {
SDDocumentType docType = search.getDocument();
assertNotNull(docType);
- assertNotNull(docType.getField("rankfeatures"));
- assertNotNull(docType.getField("summaryfeatures"));
assertNotNull(docType.getField("foo"));
assertNotNull(docType.getField("bar"));
assertNotNull(docType.getField("baz"));
assertNotNull(docType.getField("cox"));
- assertEquals(6, docType.getFieldCount());
+ assertEquals(4, docType.getFieldCount());
}
@Test
@@ -70,12 +64,10 @@ public class ImplicitSearchFieldsTestCase extends SearchDefinitionTestCase {
SDDocumentType docType = search.getDocument();
assertNotNull(docType);
- assertNotNull(docType.getField("rankfeatures"));
- assertNotNull(docType.getField("summaryfeatures"));
assertNotNull(docType.getField("foo"));
assertNotNull(docType.getField("bar"));
assertNotNull(docType.getField("baz"));
- assertEquals(5, docType.getFieldCount());
+ assertEquals(3, docType.getFieldCount());
}
@Test
@@ -85,11 +77,9 @@ public class ImplicitSearchFieldsTestCase extends SearchDefinitionTestCase {
SDDocumentType docType = search.getDocument();
assertNotNull(docType);
- assertNotNull(docType.getField("rankfeatures"));
- assertNotNull(docType.getField("summaryfeatures"));
assertNotNull(docType.getField("foo"));
assertNotNull(docType.getField("bar"));
- assertEquals(4, docType.getFieldCount());
+ assertEquals(2, docType.getFieldCount());
}
@Test
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java
index 88c85452cb3..f2d81414b5a 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/ImplicitStructTypesTestCase.java
@@ -35,8 +35,6 @@ public class ImplicitStructTypesTestCase extends SearchDefinitionTestCase {
assertField(docType, "doc_str_sum", DataType.STRING);
assertField(docType, "doc_uri", DataType.URI);
assertField(docType, "docsum_str", DataType.STRING);
- assertField(docType, "rankfeatures", DataType.STRING);
- assertField(docType, "summaryfeatures", DataType.STRING);
}
@SuppressWarnings({ "UnusedDeclaration" })
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/VespaMlModelTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/VespaMlModelTestCase.java
index 34b727f9f4e..412264aec57 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/VespaMlModelTestCase.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/VespaMlModelTestCase.java
@@ -26,7 +26,7 @@ public class VespaMlModelTestCase {
private final String expectedRankConfig =
"constant(constant1).type : tensor(x[3])\n" +
- "constant(constant1).value : tensor(x[3]):{{x:0}:0.5,{x:1}:1.5,{x:2}:2.5}\n" +
+ "constant(constant1).value : tensor(x[3]):[0.5, 1.5, 2.5]\n" +
"rankingExpression(foo1).rankingScript : reduce(reduce(input1 * input2, sum, name) * constant(constant1), max, x) * 3.0\n" +
"rankingExpression(foo1).input2.type : tensor(x[3])\n" +
"rankingExpression(foo1).input1.type : tensor(name{},x[3])\n" +