From f94e8b056befca8c6c1d189e1b1fb6a156f89624 Mon Sep 17 00:00:00 2001 From: Arne H Juul Date: Thu, 20 Jan 2022 08:54:29 +0000 Subject: deprecate Execution.fillAttributes() * we want to make some slight changes here for Vespa 8, and hopefully get rid of this completely for Vespa 9. Prepare for this by marking the old method (and public constant) as deprecated, and explain what should be used instead. --- .../com/yahoo/search/yql/YqlFieldAndSourceTestCase.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'container-search/src/test/java/com/yahoo') diff --git a/container-search/src/test/java/com/yahoo/search/yql/YqlFieldAndSourceTestCase.java b/container-search/src/test/java/com/yahoo/search/yql/YqlFieldAndSourceTestCase.java index 5d3a95efc78..0385de5bebf 100644 --- a/container-search/src/test/java/com/yahoo/search/yql/YqlFieldAndSourceTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/yql/YqlFieldAndSourceTestCase.java @@ -24,7 +24,9 @@ import com.yahoo.search.Searcher; import com.yahoo.search.result.Hit; import com.yahoo.search.searchchain.Execution; import com.yahoo.search.searchchain.testutil.DocumentSourceSearcher; -import static com.yahoo.search.searchchain.testutil.DocumentSourceSearcher.DEFAULT_SUMMARY_CLASS;; +import static com.yahoo.search.searchchain.testutil.DocumentSourceSearcher.DEFAULT_SUMMARY_CLASS; +import static com.yahoo.prelude.fastsearch.VespaBackEndSearcher.SORTABLE_ATTRIBUTES_SUMMARY_CLASS; + /** * Test translation of fields and sources in YQL to the associated concepts in Vespa. @@ -52,7 +54,7 @@ public class YqlFieldAndSourceTestCase { mockBackend.addResult(query, result); mockBackend.addSummaryClassByCopy(DEFAULT_SUMMARY_CLASS, Arrays.asList(FIELD1, FIELD2)); - mockBackend.addSummaryClassByCopy(Execution.ATTRIBUTEPREFETCH, Arrays.asList(FIELD2)); + mockBackend.addSummaryClassByCopy(SORTABLE_ATTRIBUTES_SUMMARY_CLASS, Arrays.asList(FIELD2)); mockBackend.addSummaryClassByCopy(THIRD_OPTION, Arrays.asList(FIELD3)); DocumentdbInfoConfig config = new DocumentdbInfoConfig(new DocumentdbInfoConfig.Builder() @@ -90,7 +92,7 @@ public class YqlFieldAndSourceTestCase { new Fields.Builder().name(FIELD2).type("string"))), new Summaryclass.Builder() .id(1) - .name(Execution.ATTRIBUTEPREFETCH) + .name(SORTABLE_ATTRIBUTES_SUMMARY_CLASS) .fields(Arrays.asList(new Fields.Builder().name(FIELD2).type("string"))), new Summaryclass.Builder() .id(2) @@ -112,7 +114,7 @@ public class YqlFieldAndSourceTestCase { execution.fill(result); assertEquals(1, result.getConcreteHitCount()); assertTrue(result.hits().get(0).isFilled(DEFAULT_SUMMARY_CLASS)); - assertFalse(result.hits().get(0).isFilled(Execution.ATTRIBUTEPREFETCH)); + assertFalse(result.hits().get(0).isFilled(SORTABLE_ATTRIBUTES_SUMMARY_CLASS)); } @Test @@ -123,7 +125,7 @@ public class YqlFieldAndSourceTestCase { assertEquals(1, result.getConcreteHitCount()); assertTrue(result.hits().get(0).isFilled(THIRD_OPTION)); assertFalse(result.hits().get(0).isFilled(DEFAULT_SUMMARY_CLASS)); - assertTrue(result.hits().get(0).isFilled(Execution.ATTRIBUTEPREFETCH)); + assertTrue(result.hits().get(0).isFilled(SORTABLE_ATTRIBUTES_SUMMARY_CLASS)); } @Test @@ -134,7 +136,7 @@ public class YqlFieldAndSourceTestCase { assertEquals(1, result.getConcreteHitCount()); assertTrue(result.hits().get(0).isFilled(THIRD_OPTION)); assertFalse(result.hits().get(0).isFilled(DEFAULT_SUMMARY_CLASS)); - assertFalse(result.hits().get(0).isFilled(Execution.ATTRIBUTEPREFETCH)); + assertFalse(result.hits().get(0).isFilled(SORTABLE_ATTRIBUTES_SUMMARY_CLASS)); } @Test @@ -145,7 +147,7 @@ public class YqlFieldAndSourceTestCase { assertEquals(1, result.getConcreteHitCount()); assertTrue(result.hits().get(0).isFilled(THIRD_OPTION)); assertTrue(result.hits().get(0).isFilled(DEFAULT_SUMMARY_CLASS)); - assertFalse(result.hits().get(0).isFilled(Execution.ATTRIBUTEPREFETCH)); + assertFalse(result.hits().get(0).isFilled(SORTABLE_ATTRIBUTES_SUMMARY_CLASS)); } } -- cgit v1.2.3