summaryrefslogtreecommitdiffstats
path: root/vdslib
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2023-07-07 10:41:58 +0200
committerHarald Musum <musum@yahooinc.com>2023-07-07 10:41:58 +0200
commit6697ab6cdbc94505f95ce09bc17873e756c19c00 (patch)
tree0babfb59bd6bb6a4115501604789f1027a7a3a25 /vdslib
parentb23133428a974c467385d625489eaffef03a201a (diff)
Add back needed code
Diffstat (limited to 'vdslib')
-rw-r--r--vdslib/src/main/java/com/yahoo/vdslib/SearchResult.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/vdslib/src/main/java/com/yahoo/vdslib/SearchResult.java b/vdslib/src/main/java/com/yahoo/vdslib/SearchResult.java
index 5ef3e82b1e6..c89abf87970 100644
--- a/vdslib/src/main/java/com/yahoo/vdslib/SearchResult.java
+++ b/vdslib/src/main/java/com/yahoo/vdslib/SearchResult.java
@@ -62,6 +62,7 @@ public class SearchResult {
}
private final int totalHits;
private final Hit[] hits;
+ private final TreeMap<Integer, byte []> aggregatorList;
private final TreeMap<Integer, byte []> groupingList;
private static final int EXTENSION_FLAGS_PRESENT = -1;
private static final int MATCH_FEATURES_PRESENT_MASK = 1;
@@ -78,6 +79,7 @@ public class SearchResult {
}
hits = new Hit[numHits];
if (numHits != 0) {
+ int docIdBufferLength = buf.getInt(null); // Unused, but need to call getInt() to advance buffer
byte[] cArr = bser.getBuf().array();
int start = bser.getBuf().arrayOffset() + bser.position();
for(int i=0; i < numHits; i++) {
@@ -101,6 +103,15 @@ public class SearchResult {
hits[i] = new HitWithSortBlob(hits[i], buf.getBytes(null, size[i]));
}
+ // Unused, but need to call getInt() to advance buffer
+ int numAggregators = buf.getInt(null);
+ aggregatorList = new TreeMap<>();
+ for (int i = 0; i < numAggregators; i++) {
+ int aggrId = buf.getInt(null);
+ int aggrLength = buf.getInt(null);
+ aggregatorList.put(aggrId, buf.getBytes(null, aggrLength));
+ }
+
int numGroupings = buf.getInt(null);
groupingList = new TreeMap<>();
for (int i = 0; i < numGroupings; i++) {