aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/search/querytransform/WandSearcherTestCase.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-10-15 20:06:06 +0200
committerJon Bratseth <bratseth@oath.com>2018-10-15 20:06:06 +0200
commitb28a953489d50d4366ebd01922ea1d1febdfe86c (patch)
treec2b441912e76d0cb08d9cfed6307c97d72ac51fe /container-search/src/test/java/com/yahoo/search/querytransform/WandSearcherTestCase.java
parentdbefc9f0fa3b338232fc504f547a0f71c5f56d71 (diff)
Avoid deprecated method
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/querytransform/WandSearcherTestCase.java')
-rw-r--r--container-search/src/test/java/com/yahoo/search/querytransform/WandSearcherTestCase.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/querytransform/WandSearcherTestCase.java b/container-search/src/test/java/com/yahoo/search/querytransform/WandSearcherTestCase.java
index 93955da383e..c52cedaaf0e 100644
--- a/container-search/src/test/java/com/yahoo/search/querytransform/WandSearcherTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/querytransform/WandSearcherTestCase.java
@@ -4,6 +4,8 @@ package com.yahoo.search.querytransform;
import com.yahoo.component.chain.Chain;
import com.yahoo.prelude.Index;
import com.yahoo.prelude.IndexFacts;
+import com.yahoo.prelude.IndexModel;
+import com.yahoo.prelude.SearchDefinition;
import com.yahoo.prelude.query.AndItem;
import com.yahoo.prelude.query.DotProductItem;
import com.yahoo.prelude.query.Item;
@@ -20,6 +22,7 @@ import com.yahoo.search.searchchain.Execution;
import org.junit.Before;
import org.junit.Test;
+import java.util.Collections;
import java.util.ListIterator;
import static com.yahoo.container.protect.Error.INVALID_QUERY_PARAMETER;
@@ -40,10 +43,9 @@ public class WandSearcherTestCase {
@SuppressWarnings("deprecation")
private IndexFacts buildIndexFacts() {
- IndexFacts retval = new IndexFacts();
- retval.addIndex("test", new Index(VESPA_FIELD));
- retval.freeze();
- return retval;
+ SearchDefinition sd = new SearchDefinition("test");
+ sd.addIndex(new Index(VESPA_FIELD));
+ return new IndexFacts(new IndexModel(Collections.emptyMap(), Collections.singleton(sd)));
}
private Execution buildExec() {