summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-02-09 11:10:19 +0100
committerHenning Baldersheim <balder@oath.com>2018-02-09 12:07:21 +0100
commit2c3eda86a407d441561dcec1c929d2a29bea697a (patch)
tree677440b7d1e2e333b832132b8890c97a4a8f12fc /searchlib
parent4f55d543f0569d992a21f69b4b3c1309790de74d (diff)
Compute nodes queried/replied more correctly during merge to get it more correct in MLD cases.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/common/packets/packets_test.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/common/packets.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/searchlib/src/tests/common/packets/packets_test.cpp b/searchlib/src/tests/common/packets/packets_test.cpp
index ad4cf02f4e8..999e370c67f 100644
--- a/searchlib/src/tests/common/packets/packets_test.cpp
+++ b/searchlib/src/tests/common/packets/packets_test.cpp
@@ -352,8 +352,8 @@ TEST("testQueryResultX") {
EXPECT_EQUAL(2u, ptr->_totNumDocs);
EXPECT_EQUAL((search::HitRank)3, ptr->_maxRank);
EXPECT_EQUAL(4u, ptr->getDistributionKey());
- EXPECT_EQUAL(ptr->_features & QRF_COVERAGE_NODES ? 12 : 0u, ptr->getNodesQueried());
- EXPECT_EQUAL(ptr->_features & QRF_COVERAGE_NODES ? 11 : 0u, ptr->getNodesReplied());
+ EXPECT_EQUAL(ptr->_features & QRF_COVERAGE_NODES ? 12 : 1u, ptr->getNodesQueried());
+ EXPECT_EQUAL(ptr->_features & QRF_COVERAGE_NODES ? 11 : 1u, ptr->getNodesReplied());
EXPECT_EQUAL(6u, ptr->_coverageDocs);
EXPECT_EQUAL(7u, ptr->_activeDocs);
EXPECT_EQUAL(8u, ptr->_soonActiveDocs);
diff --git a/searchlib/src/vespa/searchlib/common/packets.cpp b/searchlib/src/vespa/searchlib/common/packets.cpp
index 4bb11acaabb..7f512544a82 100644
--- a/searchlib/src/vespa/searchlib/common/packets.cpp
+++ b/searchlib/src/vespa/searchlib/common/packets.cpp
@@ -906,8 +906,8 @@ FS4Packet_QUERYRESULTX::AllocateHits(uint32_t cnt)
FS4Packet_QUERYRESULTX::FS4Packet_QUERYRESULTX()
: FS4Packet(),
_distributionKey(0),
- _nodesQueried(0),
- _nodesReplied(0),
+ _nodesQueried(1),
+ _nodesReplied(1),
_features(QRF_COVERAGE | QRF_EXTENDED_COVERAGE),
_offset(0),
_numDocs(0),