diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-02-06 22:08:15 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2022-02-06 22:08:15 +0100 |
commit | 54e4df56234906450f2d6bf82a0527e924e987f7 (patch) | |
tree | 78a2e01d7b9423a9f8180f6265e8fa098996961c /container-search/src/main/java/com/yahoo/search/Query.java | |
parent | b7615a4a248be8809a2a5c9d3e95f18aa825dc82 (diff) |
Deprecate binary encoding outside VDS
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/Query.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/Query.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/Query.java b/container-search/src/main/java/com/yahoo/search/Query.java index 623c38fa9f0..77cd4f3b292 100644 --- a/container-search/src/main/java/com/yahoo/search/Query.java +++ b/container-search/src/main/java/com/yahoo/search/Query.java @@ -1048,6 +1048,7 @@ public class Query extends com.yahoo.processing.Request implements Cloneable { return new SessionId(requestId, getRanking().getProfile()); } + @Deprecated // TODO: Remove on Vespa 8 public boolean hasEncodableProperties() { if ( ! ranking.getProperties().isEmpty()) return true; if ( ! ranking.getFeatures().isEmpty()) return true; @@ -1064,39 +1065,29 @@ public class Query extends com.yahoo.processing.Request implements Cloneable { * @param buffer the buffer to encode to * @param encodeQueryData true to encode all properties, false to only include session information, not actual query data * @return the encoded length + * @deprecated do not use */ + @Deprecated // TODO: Remove on Vespa 8 public int encodeAsProperties(ByteBuffer buffer, boolean encodeQueryData) { // Make sure we don't encode anything here if we have turned the property feature off // Due to sendQuery we sometimes end up turning this feature on and then encoding a 0 int as the number of // property maps - that's ok (probably we should simplify by just always turning the feature on) if (! hasEncodableProperties()) return 0; - int start = buffer.position(); - int mapCountPosition = buffer.position(); buffer.putInt(0); // map count will go here - int mapCount = 0; - - // TODO: Push down mapCount += ranking.getProperties().encode(buffer, encodeQueryData); if (encodeQueryData) { mapCount += ranking.getFeatures().encode(buffer); - - // TODO: Push down if (presentation.getHighlight() != null) { mapCount += MapEncoder.encodeMultiMap(Highlight.HIGHLIGHTTERMS, presentation.getHighlight().getHighlightTerms(), buffer); } - - // TODO: Push down mapCount += MapEncoder.encodeMap("model", createModelMap(), buffer); } mapCount += MapEncoder.encodeSingleValue(DocumentDatabase.MATCH_PROPERTY, DocumentDatabase.SEARCH_DOC_TYPE_KEY, model.getDocumentDb(), buffer); - mapCount += MapEncoder.encodeMap("caches", createCacheSettingMap(), buffer); - buffer.putInt(mapCountPosition, mapCount); - return buffer.position() - start; } |