diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-11-25 02:38:55 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-01-25 18:55:20 +0100 |
commit | e215f5577b3b58ea78670f2ec5e4d259cb825082 (patch) | |
tree | 3037eff5fb340f63ef4018295895ac369e45b142 /container-search/src/main/java/com/yahoo/fs4 | |
parent | dd98862b1e13654bb4005b88c2d748e5fc47b3c7 (diff) |
Render timeout information all the way.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/fs4')
-rw-r--r-- | container-search/src/main/java/com/yahoo/fs4/QueryResultPacket.java | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/container-search/src/main/java/com/yahoo/fs4/QueryResultPacket.java b/container-search/src/main/java/com/yahoo/fs4/QueryResultPacket.java index 0b940791326..2714ea7ee76 100644 --- a/container-search/src/main/java/com/yahoo/fs4/QueryResultPacket.java +++ b/container-search/src/main/java/com/yahoo/fs4/QueryResultPacket.java @@ -31,8 +31,11 @@ public class QueryResultPacket extends Packet { /** Whether coverage information is included in this result */ private boolean coverageFeature = false; + private boolean coverageExtendedFeature = false; private long coverageDocs = 0; private long activeDocs = 0; + private long soonActiveDocs = 0; + private int degradedReason = 0; /** Whether the result contains grouping results **/ private boolean groupDataFeature = false; @@ -81,6 +84,10 @@ public class QueryResultPacket extends Packet { public long getActiveDocs() { return activeDocs; } + public long getSoonActiveDocs() { return soonActiveDocs; } + + public int getDegradedReason() { return degradedReason; } + public boolean getCoverageFull() { return coverageDocs == activeDocs; } @@ -117,6 +124,13 @@ public class QueryResultPacket extends Packet { coverageDocs = buffer.getLong(); activeDocs = buffer.getLong(); } + if (coverageExtendedFeature) { + soonActiveDocs = buffer.getLong(); + degradedReason = buffer.getInt(); + } else { + soonActiveDocs = activeDocs; + degradedReason = 0; + } decodeDocuments(buffer,documentCount); if (propsFeature) { int numMaps = buffer.getInt(); @@ -135,11 +149,12 @@ public class QueryResultPacket extends Packet { /** * feature bits */ - public static final int QRF_MLD = 0x00000001; - public static final int QRF_SORTDATA = 0x00000010; - public static final int QRF_COVERAGE = 0x00000040; - public static final int QRF_GROUPDATA = 0x00000200; - public static final int QRF_PROPERTIES = 0x00000400; + public static final int QRF_MLD = 0x00000001; + public static final int QRF_SORTDATA = 0x00000010; + public static final int QRF_EXTENDED_COVERAGE = 0x00000020; + public static final int QRF_COVERAGE = 0x00000040; + public static final int QRF_GROUPDATA = 0x00000200; + public static final int QRF_PROPERTIES = 0x00000400; /** * Sets the features of this package. @@ -154,6 +169,7 @@ public class QueryResultPacket extends Packet { datasetFeature = (0x002 & features) != 0; // Data given by sortFeature not currently used by QRS: // sortFeature = (QRF_SORTDATA & features) != 0; + coverageExtendedFeature = (QRF_EXTENDED_COVERAGE & features) != 0; coverageFeature = (QRF_COVERAGE & features) != 0; groupDataFeature = (QRF_GROUPDATA & features) != 0; propsFeature = (QRF_PROPERTIES & features) != 0; |