summaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
Diffstat (limited to 'container-search')
-rw-r--r--container-search/CMakeLists.txt1
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java24
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/ClusterParams.java13
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinition.java6
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinitionSet.java19
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumField.java15
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/DocumentDatabase.java5
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java2
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/FeatureDataField.java18
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/StructDataField.java3
-rw-r--r--container-search/src/main/java/com/yahoo/prelude/fastsearch/VespaBackEndSearcher.java2
-rw-r--r--container-search/src/main/java/com/yahoo/search/dispatch/RpcResourcePool.java17
-rw-r--r--container-search/src/main/resources/configdefinitions/legacy-emulation.def11
-rw-r--r--container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java4
-rw-r--r--container-search/src/test/java/com/yahoo/prelude/fastsearch/SlimeSummaryTestCase.java33
15 files changed, 29 insertions, 144 deletions
diff --git a/container-search/CMakeLists.txt b/container-search/CMakeLists.txt
index dcf6c3461d3..9f099dfad72 100644
--- a/container-search/CMakeLists.txt
+++ b/container-search/CMakeLists.txt
@@ -6,7 +6,6 @@ install_config_definition(src/main/resources/configdefinitions/federation.def se
install_config_definition(src/main/resources/configdefinitions/fs4.def container.search.fs4.def)
install_config_definition(src/main/resources/configdefinitions/index-info.def search.config.index-info.def)
install_config_definition(src/main/resources/configdefinitions/keyvalue.def prelude.searcher.keyvalue.def)
-install_config_definition(src/main/resources/configdefinitions/legacy-emulation.def container.search.legacy-emulation.def)
install_config_definition(src/main/resources/configdefinitions/lowercasing.def search.querytransform.lowercasing.def)
install_config_definition(src/main/resources/configdefinitions/measure-qps.def search.statistics.measure-qps.def)
install_config_definition(src/main/resources/configdefinitions/page-templates.def search.pagetemplates.page-templates.def)
diff --git a/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java b/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java
index fd150f975c3..92b6eef906e 100644
--- a/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java
+++ b/container-search/src/main/java/com/yahoo/prelude/cluster/ClusterSearcher.java
@@ -11,7 +11,6 @@ import com.yahoo.concurrent.Receiver.MessageState;
import com.yahoo.container.QrSearchersConfig;
import com.yahoo.container.handler.VipStatus;
import com.yahoo.fs4.mplex.Backend;
-import com.yahoo.container.search.LegacyEmulationConfig;
import com.yahoo.net.HostName;
import com.yahoo.search.dispatch.Dispatcher;
import com.yahoo.prelude.fastsearch.FS4ResourcePool;
@@ -100,7 +99,6 @@ public class ClusterSearcher extends Searcher {
QrSearchersConfig qrsConfig,
ClusterConfig clusterConfig,
DocumentdbInfoConfig documentDbConfig,
- LegacyEmulationConfig emulationConfig,
QrMonitorConfig monitorConfig,
DispatchConfig dispatchConfig,
ClusterInfoConfig clusterInfoConfig,
@@ -133,7 +131,7 @@ public class ClusterSearcher extends Searcher {
SummaryParameters docSumParams = new SummaryParameters(qrsConfig
.com().yahoo().prelude().fastsearch().FastSearcher().docsum()
.defaultclass());
-
+
for (DocumentdbInfoConfig.Documentdb docDb : documentDbConfig.documentdb()) {
String docTypeName = docDb.name();
documentTypes.add(docTypeName);
@@ -146,7 +144,7 @@ public class ClusterSearcher extends Searcher {
if (searchClusterConfig.indexingmode() == STREAMING) {
VdsStreamingSearcher searcher = vdsCluster(fs4ResourcePool.getServerId(),
searchClusterIndex,
- searchClusterConfig, cacheParams, emulationConfig, docSumParams,
+ searchClusterConfig, cacheParams, docSumParams,
documentDbConfig);
addBackendSearcher(searcher);
} else {
@@ -156,7 +154,7 @@ public class ClusterSearcher extends Searcher {
if ( ! isRemote(searchClusterConfig.dispatcher(dispatcherIndex).host())) {
Backend dispatchBackend = createBackend(searchClusterConfig.dispatcher(dispatcherIndex));
FastSearcher searcher = searchDispatch(searchClusterIndex, fs4ResourcePool,
- cacheParams, emulationConfig, docSumParams,
+ cacheParams, docSumParams,
documentDbConfig, dispatchBackend, dispatcher, dispatcherIndex);
addBackendSearcher(searcher);
}
@@ -192,22 +190,21 @@ public class ClusterSearcher extends Searcher {
}
private static ClusterParams makeClusterParams(int searchclusterIndex,
- LegacyEmulationConfig emulConfig,
int dispatchIndex) {
- return new ClusterParams("sc" + searchclusterIndex + ".num" + dispatchIndex, emulConfig);
+ return new ClusterParams("sc" + searchclusterIndex + ".num" + dispatchIndex);
}
private static FastSearcher searchDispatch(int searchclusterIndex,
FS4ResourcePool fs4ResourcePool,
CacheParams cacheParams,
- LegacyEmulationConfig emulConfig,
SummaryParameters docSumParams,
DocumentdbInfoConfig documentdbInfoConfig,
Backend backend,
Dispatcher dispatcher,
int dispatcherIndex) {
- ClusterParams clusterParams = makeClusterParams(searchclusterIndex, emulConfig, dispatcherIndex);
- return new FastSearcher(backend, fs4ResourcePool, dispatcher, docSumParams, clusterParams, cacheParams,
+ ClusterParams clusterParams = makeClusterParams(searchclusterIndex,
+ dispatcherIndex);
+ return new FastSearcher(backend, fs4ResourcePool, dispatcher, docSumParams, clusterParams, cacheParams,
documentdbInfoConfig);
}
@@ -215,14 +212,13 @@ public class ClusterSearcher extends Searcher {
int searchclusterIndex,
QrSearchersConfig.Searchcluster searchClusterConfig,
CacheParams cacheParams,
- LegacyEmulationConfig emulConfig,
SummaryParameters docSumParams,
DocumentdbInfoConfig documentdbInfoConfig)
{
if (searchClusterConfig.searchdef().size() != 1) {
throw new IllegalArgumentException("Search clusters in streaming search shall only contain a single searchdefinition : " + searchClusterConfig.searchdef());
}
- ClusterParams clusterParams = makeClusterParams(searchclusterIndex, emulConfig, 0);
+ ClusterParams clusterParams = makeClusterParams(searchclusterIndex, 0);
VdsStreamingSearcher searcher = (VdsStreamingSearcher) VespaBackEndSearcher
.getSearcher("com.yahoo.vespa.streamingvisitors.VdsStreamingSearcher");
searcher.setSearchClusterConfigId(searchClusterConfig.rankprofiles().configid());
@@ -319,7 +315,7 @@ public class ClusterSearcher extends Searcher {
if (invalidInDocTypes != null && !invalidInDocTypes.isEmpty()) {
String plural = invalidInDocTypes.size() > 1 ? "s" : "";
- return new Result(query,
+ return new Result(query,
ErrorMessage.createInvalidQueryParameter("Requested rank profile '" + rankProfile +
"' is undefined for document type" + plural + " '" +
StringUtils.join(invalidInDocTypes.iterator(), ", ") + "'"));
@@ -384,7 +380,7 @@ public class ClusterSearcher extends Searcher {
if (query.getTimeout() <= maxQueryTimeout) return;
if (query.isTraceable(2)) {
- query.trace("Query timeout (" + query.getTimeout() + " ms) > max query timeout (" +
+ query.trace("Query timeout (" + query.getTimeout() + " ms) > max query timeout (" +
maxQueryTimeout + " ms). Setting timeout to " + maxQueryTimeout + " ms.", 2);
}
query.setTimeout(maxQueryTimeout);
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/ClusterParams.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/ClusterParams.java
index 3dfa506a967..2787447e791 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/ClusterParams.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/ClusterParams.java
@@ -1,8 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.fastsearch;
-import com.yahoo.container.search.LegacyEmulationConfig;
-
/**
* Helper class for carrying around cluster-related
* config parameters to the FastSearcher class.
@@ -12,21 +10,12 @@ import com.yahoo.container.search.LegacyEmulationConfig;
public class ClusterParams {
public final String searcherName;
- public final LegacyEmulationConfig emulation;
-
- /**
- * For testcases only
- */
- public ClusterParams(String name) {
- this(name, new LegacyEmulationConfig(new LegacyEmulationConfig.Builder()));
- }
/**
* Make up full ClusterParams
*/
- public ClusterParams(String name, LegacyEmulationConfig cfg) {
+ public ClusterParams(String name) {
this.searcherName = name;
- this.emulation = cfg;
}
}
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinition.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinition.java
index cdf696ebe1e..20615a099b6 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinition.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinition.java
@@ -4,7 +4,6 @@ package com.yahoo.prelude.fastsearch;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.yahoo.data.access.Inspector;
-import com.yahoo.container.search.LegacyEmulationConfig;
import java.util.ArrayList;
import java.util.HashMap;
@@ -41,8 +40,7 @@ public class DocsumDefinition {
this.fieldNameToIndex = fieldNameToIndexBuilder.build();
}
- // TODO: Remove LegacyEmulationConfig (the config, not just the usage) on Vespa 7
- DocsumDefinition(DocumentdbInfoConfig.Documentdb.Summaryclass config, LegacyEmulationConfig emulConfig) {
+ DocsumDefinition(DocumentdbInfoConfig.Documentdb.Summaryclass config) {
this.name = config.name();
List<DocsumField> fieldsBuilder = new ArrayList<>();
@@ -51,7 +49,7 @@ public class DocsumDefinition {
for (DocumentdbInfoConfig.Documentdb.Summaryclass.Fields field : config.fields()) {
// no, don't switch the order of the two next lines :)
fieldNameToIndexBuilder.put(field.name(), fieldsBuilder.size());
- fieldsBuilder.add(DocsumField.create(field.name(), field.type(), emulConfig));
+ fieldsBuilder.add(DocsumField.create(field.name(), field.type()));
if (field.dynamic())
dynamic = true;
}
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinitionSet.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinitionSet.java
index 07997f0c8f6..7745a71b24f 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinitionSet.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumDefinitionSet.java
@@ -7,7 +7,6 @@ import com.yahoo.data.access.Inspector;
import com.yahoo.slime.Slime;
import com.yahoo.data.access.slime.SlimeAdapter;
import com.yahoo.prelude.ConfigurationException;
-import com.yahoo.container.search.LegacyEmulationConfig;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
@@ -31,27 +30,15 @@ public final class DocsumDefinitionSet {
private final static Logger log = Logger.getLogger(DocsumDefinitionSet.class.getName());
private final Map<String, DocsumDefinition> definitionsByName;
- private final LegacyEmulationConfig emulationConfig;
public DocsumDefinitionSet(DocumentdbInfoConfig.Documentdb config) {
- this(config, new LegacyEmulationConfig(new LegacyEmulationConfig.Builder()));
- }
-
- public DocsumDefinitionSet(DocumentdbInfoConfig.Documentdb config, LegacyEmulationConfig emulConfig) {
- this(toDocsums(config, emulConfig), emulConfig);
+ this(toDocsums(config));
}
public DocsumDefinitionSet(Collection<DocsumDefinition> docsumDefinitions) {
- this(docsumDefinitions, new LegacyEmulationConfig(new LegacyEmulationConfig.Builder()));
- }
-
- public DocsumDefinitionSet(Collection<DocsumDefinition> docsumDefinitions, LegacyEmulationConfig emulConfig) {
this.definitionsByName = ImmutableMap.copyOf(docsumDefinitions.stream().collect(Collectors.toMap(DocsumDefinition::getName, p -> p)));
- this.emulationConfig = emulConfig;
}
- public LegacyEmulationConfig legacyEmulationConfig() { return emulationConfig; }
-
/**
* Returns the summary definition of the given name, or the default if not found.
*
@@ -111,10 +98,10 @@ public final class DocsumDefinitionSet {
return definitionsByName.size();
}
- private static Collection<DocsumDefinition> toDocsums(DocumentdbInfoConfig.Documentdb config, LegacyEmulationConfig emulConfig) {
+ private static Collection<DocsumDefinition> toDocsums(DocumentdbInfoConfig.Documentdb config) {
Collection<DocsumDefinition> docsums = new ArrayList<>();
for (int i = 0; i < config.summaryclass().size(); ++i)
- docsums.add(new DocsumDefinition(config.summaryclass(i), emulConfig));
+ docsums.add(new DocsumDefinition(config.summaryclass(i)));
if (docsums.isEmpty())
log.warning("No summary classes found in DocumentdbInfoConfig.Documentdb");
return docsums;
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumField.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumField.java
index 777919286dd..4f52ef91725 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumField.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocsumField.java
@@ -1,7 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.prelude.fastsearch;
-import com.yahoo.container.search.LegacyEmulationConfig;
import com.yahoo.data.access.Inspector;
import com.yahoo.log.LogLevel;
@@ -31,19 +30,14 @@ public abstract class DocsumField {
constructors.put(typename, constructor);
}
- DocsumField create(String typename, String name, LegacyEmulationConfig emulConfig)
+ DocsumField create(String typename, String name)
throws InstantiationException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException {
DocsumField f = constructors.get(typename).newInstance(name);
- f.emulConfig = emulConfig;
return f;
}
}
- private LegacyEmulationConfig emulConfig;
-
- final LegacyEmulationConfig getEmulConfig() { return emulConfig; }
-
static {
fieldFactory = new FieldFactory();
@@ -75,14 +69,9 @@ public abstract class DocsumField {
this.name = name;
}
- /* For unit test only */
public static DocsumField create(String name, String typename) {
- return create(name, typename, new LegacyEmulationConfig(new LegacyEmulationConfig.Builder()));
- }
-
- public static DocsumField create(String name, String typename, LegacyEmulationConfig emulConfig) {
try {
- return fieldFactory.create(typename, name, emulConfig);
+ return fieldFactory.create(typename, name);
} catch (Exception e) {
throw new RuntimeException("Unknown field type '" + typename + "'", e);
}
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocumentDatabase.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocumentDatabase.java
index 0ae0983a1ae..aa492524c83 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocumentDatabase.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/DocumentDatabase.java
@@ -2,7 +2,6 @@
package com.yahoo.prelude.fastsearch;
import com.google.common.collect.ImmutableMap;
-import com.yahoo.container.search.LegacyEmulationConfig;
import java.util.ArrayList;
import java.util.Collection;
@@ -29,8 +28,8 @@ public class DocumentDatabase {
private final ImmutableMap<String, RankProfile> rankProfiles;
- public DocumentDatabase(DocumentdbInfoConfig.Documentdb documentDb, LegacyEmulationConfig emulConfig) {
- this(documentDb.name(), new DocsumDefinitionSet(documentDb, emulConfig), toRankProfiles(documentDb.rankprofile()));
+ public DocumentDatabase(DocumentdbInfoConfig.Documentdb documentDb) {
+ this(documentDb.name(), new DocsumDefinitionSet(documentDb), toRankProfiles(documentDb.rankprofile()));
}
public DocumentDatabase(String name, DocsumDefinitionSet docsumDefinitionSet, Collection<RankProfile> rankProfiles) {
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java
index 28d426cec06..e9442aaf615 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FastHit.java
@@ -539,7 +539,7 @@ public class FastHit extends Hit {
DocsumField fieldType = type.getField(name);
if (fieldType == null) return null;
Inspector fieldValue = data.field(name);
- if ( ! fieldValue.valid() && ! fieldType.getEmulConfig().forceFillEmptyFields()) return null;
+ if ( ! fieldValue.valid()) return null;
return fieldType.convert(fieldValue);
}
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FeatureDataField.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FeatureDataField.java
index 28c63aa2d3a..1f60dd3d1cf 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/FeatureDataField.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/FeatureDataField.java
@@ -3,7 +3,6 @@ package com.yahoo.prelude.fastsearch;
import com.yahoo.data.access.Inspector;
import com.yahoo.data.access.Type;
-import com.yahoo.container.search.LegacyEmulationConfig;
import com.yahoo.search.result.FeatureData;
/**
@@ -13,7 +12,7 @@ import com.yahoo.search.result.FeatureData;
*/
public class FeatureDataField extends LongstringField {
- public FeatureDataField (String name) {
+ public FeatureDataField(String name) {
super(name);
}
@@ -25,23 +24,12 @@ public class FeatureDataField extends LongstringField {
@Override
public Object convert(Inspector value) {
if (! value.valid()) {
- if (getEmulConfig().stringBackedFeatureData()) {
- return "";
- } else if (getEmulConfig().forceFillEmptyFields()) {
- return new FeatureData(com.yahoo.data.access.simple.Value.empty());
- } else {
- return null;
- }
+ return null;
}
if (value.type() == Type.STRING) {
return value.asString();
}
- FeatureData obj = new FeatureData(value);
- if (getEmulConfig().stringBackedFeatureData()) {
- return obj.toJson();
- } else {
- return obj;
- }
+ return new FeatureData(value);
}
}
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/StructDataField.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/StructDataField.java
index 9521854477a..18986667a6c 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/StructDataField.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/StructDataField.java
@@ -4,7 +4,6 @@ package com.yahoo.prelude.fastsearch;
import com.yahoo.search.result.StructuredData;
import com.yahoo.data.access.Inspector;
import com.yahoo.data.access.Type;
-import com.yahoo.container.search.LegacyEmulationConfig;
import com.yahoo.prelude.hitfield.JSONString;
/**
@@ -23,7 +22,7 @@ public class StructDataField extends JSONField {
@Override
public Object convert(Inspector value) {
- if (getEmulConfig().stringBackedStructuredData() || value.type() == Type.STRING) {
+ if (value.type() == Type.STRING) {
return super.convert(value);
}
return new StructuredData(value);
diff --git a/container-search/src/main/java/com/yahoo/prelude/fastsearch/VespaBackEndSearcher.java b/container-search/src/main/java/com/yahoo/prelude/fastsearch/VespaBackEndSearcher.java
index e8f5d7110f7..7def8e744a6 100644
--- a/container-search/src/main/java/com/yahoo/prelude/fastsearch/VespaBackEndSearcher.java
+++ b/container-search/src/main/java/com/yahoo/prelude/fastsearch/VespaBackEndSearcher.java
@@ -177,7 +177,7 @@ public abstract class VespaBackEndSearcher extends PingableSearcher {
if (documentdbInfoConfig != null) {
for (DocumentdbInfoConfig.Documentdb docDb : documentdbInfoConfig.documentdb()) {
- DocumentDatabase db = new DocumentDatabase(docDb, clusterParams.emulation);
+ DocumentDatabase db = new DocumentDatabase(docDb);
if (documentDbs.isEmpty()) {
defaultDocumentDb = db;
}
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/RpcResourcePool.java b/container-search/src/main/java/com/yahoo/search/dispatch/RpcResourcePool.java
index 8ab80ec17dd..bf626312b13 100644
--- a/container-search/src/main/java/com/yahoo/search/dispatch/RpcResourcePool.java
+++ b/container-search/src/main/java/com/yahoo/search/dispatch/RpcResourcePool.java
@@ -3,7 +3,6 @@ package com.yahoo.search.dispatch;
import com.google.common.collect.ImmutableMap;
import com.yahoo.compress.Compressor;
-import com.yahoo.container.search.LegacyEmulationConfig;
import com.yahoo.prelude.fastsearch.DocumentDatabase;
import com.yahoo.prelude.fastsearch.VespaBackEndSearcher;
import com.yahoo.processing.request.CompoundName;
@@ -52,9 +51,8 @@ public class RpcResourcePool {
if (query.properties().getBoolean(dispatchSummaries, true)
&& ! searcher.summaryNeedsQuery(query)
&& query.getRanking().getLocation() == null
- && ! searcher.getCacheControl().useCache(query)
- && ! legacyEmulationConfigIsSet(documentDb)) {
-
+ && ! searcher.getCacheControl().useCache(query))
+ {
return Optional.of(new RpcFillInvoker(this, documentDb));
} else {
return Optional.empty();
@@ -66,17 +64,6 @@ public class RpcResourcePool {
return new RpcFillInvoker(this, documentDb);
}
- private boolean legacyEmulationConfigIsSet(DocumentDatabase db) {
- LegacyEmulationConfig config = db.getDocsumDefinitionSet().legacyEmulationConfig();
- if (config.forceFillEmptyFields())
- return true;
- if (config.stringBackedFeatureData())
- return true;
- if (config.stringBackedStructuredData())
- return true;
- return false;
- }
-
public Compressor compressor() {
return compressor;
}
diff --git a/container-search/src/main/resources/configdefinitions/legacy-emulation.def b/container-search/src/main/resources/configdefinitions/legacy-emulation.def
deleted file mode 100644
index 95469338bb7..00000000000
--- a/container-search/src/main/resources/configdefinitions/legacy-emulation.def
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-namespace=container.search
-
-## Keep emulating old (4.2, 5.0, early 5.1) string type fields for structured data
-stringBackedStructuredData bool default=false
-
-## Keep emulating old (4.2, 5.0, early 5.1) string type fields for summaryfeatures / rankfeatures fields
-stringBackedFeatureData bool default=false
-
-## This will populate even if they are empty/undefined.
-forceFillEmptyFields bool default=false
diff --git a/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java b/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
index 646c466eba9..25d6a6e9777 100644
--- a/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
+++ b/container-search/src/test/java/com/yahoo/prelude/cluster/ClusterSearcherTestCase.java
@@ -6,7 +6,6 @@ import com.yahoo.component.ComponentId;
import com.yahoo.container.QrConfig;
import com.yahoo.container.QrSearchersConfig;
import com.yahoo.container.search.Fs4Config;
-import com.yahoo.container.search.LegacyEmulationConfig;
import com.yahoo.fs4.QueryPacket;
import com.yahoo.prelude.IndexFacts;
import com.yahoo.prelude.IndexModel;
@@ -540,7 +539,6 @@ public class ClusterSearcherTestCase {
qrSearchersConfig.build(),
clusterConfig.build(),
documentDbConfig.build(),
- new LegacyEmulationConfig.Builder().build(),
new QrMonitorConfig.Builder().build(),
new DispatchConfig.Builder().build(),
createClusterInfoConfig(),
@@ -555,7 +553,7 @@ public class ClusterSearcherTestCase {
clusterInfoConfigBuilder.nodeCount(1);
return new ClusterInfoConfig(clusterInfoConfigBuilder);
}
-
+
private static class QueryTimeoutFixture {
ClusterSearcher searcher;
Execution exec;
diff --git a/container-search/src/test/java/com/yahoo/prelude/fastsearch/SlimeSummaryTestCase.java b/container-search/src/test/java/com/yahoo/prelude/fastsearch/SlimeSummaryTestCase.java
index 81f16f7f261..ad4d0cf82e5 100644
--- a/container-search/src/test/java/com/yahoo/prelude/fastsearch/SlimeSummaryTestCase.java
+++ b/container-search/src/test/java/com/yahoo/prelude/fastsearch/SlimeSummaryTestCase.java
@@ -3,7 +3,6 @@ package com.yahoo.prelude.fastsearch;
import com.google.common.collect.ImmutableSet;
import com.yahoo.config.subscription.ConfigGetter;
-import com.yahoo.container.search.LegacyEmulationConfig;
import com.yahoo.prelude.hitfield.RawData;
import com.yahoo.prelude.hitfield.XMLString;
import com.yahoo.prelude.hitfield.JSONString;
@@ -66,33 +65,6 @@ public class SlimeSummaryTestCase {
}
@Test
- public void testDecodingEmptyWithLegacyEmulation() {
- LegacyEmulationConfig emulationConfig = new LegacyEmulationConfig(new LegacyEmulationConfig.Builder().forceFillEmptyFields(true));
- DocsumDefinitionSet docsum = createDocsumDefinitionSet(summary_cf, emulationConfig);
- FastHit hit = new FastHit();
- assertNull(docsum.lazyDecode("default", emptySummary(), hit));
- assertEquals(NanNumber.NaN, hit.getField("integer_field"));
- assertEquals(NanNumber.NaN, hit.getField("short_field"));
- assertEquals(NanNumber.NaN, hit.getField("byte_field"));
- assertEquals(NanNumber.NaN, hit.getField("float_field"));
- assertEquals(NanNumber.NaN, hit.getField("double_field"));
- assertEquals(NanNumber.NaN, hit.getField("int64_field"));
- assertEquals("", hit.getField("string_field"));
- assertEquals(RawData.class, hit.getField("data_field").getClass());
- assertEquals("", hit.getField("data_field").toString());
- assertEquals("", hit.getField("longstring_field"));
- assertEquals(RawData.class, hit.getField("longdata_field").getClass());
- assertEquals("", hit.getField("longdata_field").toString());
- assertEquals(XMLString.class, hit.getField("xmlstring_field").getClass());
- assertEquals("", hit.getField("xmlstring_field").toString());
- // assertEquals(hit.getField("jsonstring_field"), instanceOf(JSONString.class));
- assertEquals("", hit.getField("jsonstring_field").toString());
- // Empty tensors are represented by null because we don't have type information here to create the right empty tensor
- assertNull(hit.getField("tensor_field1"));
- assertNull(hit.getField("tensor_field2"));
- }
-
- @Test
public void testTimeout() {
DocsumDefinitionSet docsum = createDocsumDefinitionSet(summary_cf);
FastHit hit = new FastHit();
@@ -424,11 +396,6 @@ public class SlimeSummaryTestCase {
return new DocsumDefinitionSet(config.documentdb(0));
}
- private DocsumDefinitionSet createDocsumDefinitionSet(String configID, LegacyEmulationConfig legacyEmulationConfig) {
- DocumentdbInfoConfig config = new ConfigGetter<>(DocumentdbInfoConfig.class).getConfig(configID);
- return new DocsumDefinitionSet(config.documentdb(0), legacyEmulationConfig);
- }
-
private static class Utf8FieldTraverser implements Hit.RawUtf8Consumer {
private Map<String, Object> traversed;