public void merge(Coverage other) { if (other == null) { return; } docs += other.getDocs(); nodes += other.getNodes(); nodesTried += other.nodesTried; active += other.getActive(); soonActive += other.getSoonActive(); degradedReason |= other.degradedReason; resultSets += other.getResultSets(); fullResultSets += other.getFullResultSets(); // explicitly incomplete beats doc count beats explicitly full switch (other.fullReason) { case EXPLICITLY_FULL: // do nothing break; case EXPLICITLY_INCOMPLETE: fullReason = FullCoverageDefinition.EXPLICITLY_INCOMPLETE; break; case DOCUMENT_COUNT: if (fullReason == FullCoverageDefinition.EXPLICITLY_FULL) { fullReason = FullCoverageDefinition.DOCUMENT_COUNT; } break; } }
responseHeaders.add(BenchmarkingHeaders.DOCS_SEARCHED, String.valueOf(coverage.getDocs())); responseHeaders.add(BenchmarkingHeaders.NODES_SEARCHED, String.valueOf(coverage.getNodes())); responseHeaders.add(BenchmarkingHeaders.FULL_COVERAGE, String.valueOf(coverage.getFull() ? 1 : 0));