diff options
author | Arne H Juul <arnej@yahooinc.com> | 2022-01-20 08:54:29 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2022-01-20 08:54:29 +0000 |
commit | f94e8b056befca8c6c1d189e1b1fb6a156f89624 (patch) | |
tree | aaec23021526f0019c79afbf2c7690e9b75f3212 /container-search/src/main/java/com/yahoo/search/searchchain | |
parent | 15040f5d9099587e2a766032e73ff100c934ba8f (diff) |
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.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/searchchain')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/searchchain/Execution.java | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/searchchain/Execution.java b/container-search/src/main/java/com/yahoo/search/searchchain/Execution.java index c507069b948..9374027504e 100644 --- a/container-search/src/main/java/com/yahoo/search/searchchain/Execution.java +++ b/container-search/src/main/java/com/yahoo/search/searchchain/Execution.java @@ -8,6 +8,7 @@ import com.yahoo.prelude.IndexFacts; import com.yahoo.prelude.Ping; import com.yahoo.prelude.Pong; import com.yahoo.language.process.SpecialTokenRegistry; +import com.yahoo.prelude.fastsearch.VespaBackEndSearcher; import com.yahoo.processing.Processor; import com.yahoo.processing.Request; import com.yahoo.processing.Response; @@ -18,7 +19,6 @@ import com.yahoo.search.cluster.PingableSearcher; import com.yahoo.search.rendering.Renderer; import com.yahoo.search.rendering.RendererRegistry; import com.yahoo.search.statistics.TimeTracker; - import java.util.Objects; import java.util.concurrent.Executor; import java.util.concurrent.Executors; @@ -41,6 +41,8 @@ import java.util.concurrent.Executors; */ public class Execution extends com.yahoo.processing.execution.Execution { + /** @deprecated - applications should define their own summary class instead */ + @Deprecated(since = "7", forRemoval = true) public static final String ATTRIBUTEPREFETCH = "attributeprefetch"; /** @@ -532,18 +534,23 @@ public class Execution extends com.yahoo.processing.execution.Execution { } /** - * Fill hit properties with values from all in-memory attributes. - * This can be done with good performance on many more hits than - * those for which fill is called with the final summary class, so - * if filtering can be done using only in-memory attribute data, - * this method should be preferred over {@link #fill} to get that data for filtering. - * <p> - * Calling this on already filled results has no cost. + * Fill hit properties with values from some in-memory attributes. + * Not all attributes are included, and *which* attributes are + * subject to change depending on what Vespa needs internally. + * + * Applications should prefer to define their own summary class + * with only the in-memory attributes they need, and call + * fill(result, "foo") with the name of their own summary class + * instead of "foo". * + * @deprecated use fill(Result, String) + * + * TODO Remove on Vespa 9. * @param result the result to fill */ + @Deprecated public void fillAttributes(Result result) { - fill(result, ATTRIBUTEPREFETCH); + fill(result, VespaBackEndSearcher.SORTABLE_ATTRIBUTES_SUMMARY_CLASS); } /** |