summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-06-14 09:19:53 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2019-06-14 09:19:53 +0200
commit42c24004c346becc16e6b730fcc62d90dc59bcf3 (patch)
tree5755cf168e415fda5eb24b7d5c203ba55d4ac865 /config-model/src/test/java
parentf7137cf256adcebf6a54d6e3f49a18c2b9c4e436 (diff)
Do not add summaryfeatures and rankfeatures to document config.
Diffstat (limited to 'config-model/src/test/java')
-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
4 files changed, 8 insertions, 28 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" })