summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/Query.java
diff options
context:
space:
mode:
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.java15
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;
}