diff options
author | Jon Bratseth <bratseth@oath.com> | 2019-07-08 14:47:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-08 14:47:54 +0200 |
commit | d0b6a8a2fe100ade8d3aac5689bead29118480ad (patch) | |
tree | 466faa85c0f1a6d8311d62983e23c00126240b85 /container-search/src | |
parent | 4e8a65ed3701c814459b5ce58291d9764446d873 (diff) | |
parent | 76e924dcde2613c7956a50c29dbcc082e2b3b59c (diff) |
Merge pull request #9944 from vespa-engine/bratseth/output-immediate-graph
Bratseth/output immediate graph
Diffstat (limited to 'container-search/src')
-rw-r--r-- | container-search/src/main/java/com/yahoo/prelude/searcher/BlendingSearcher.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/searcher/BlendingSearcher.java b/container-search/src/main/java/com/yahoo/prelude/searcher/BlendingSearcher.java index 61ce9d98e69..b2f5d104890 100644 --- a/container-search/src/main/java/com/yahoo/prelude/searcher/BlendingSearcher.java +++ b/container-search/src/main/java/com/yahoo/prelude/searcher/BlendingSearcher.java @@ -73,14 +73,13 @@ public class BlendingSearcher extends Searcher { } /** - * Produce a single blended result list from a group of hitgroups. + * Produce a single blended hit list from a group of hitgroups. * - * It is assumed that the results are ordered in hitgroups. If not, the blend will not be performed + * This assumes that all hits are organized into hitgroups. If not, blending will not be performed. */ protected Result blendResults(Result result, Query q, int offset, int hits, Execution execution) { //Assert that there are more than one hitgroup and that there are only hitgroups on the lowest level - boolean foundNonGroup = false; Iterator<Hit> hitIterator = result.hits().iterator(); List<HitGroup> groups = new ArrayList<>(); @@ -89,14 +88,14 @@ public class BlendingSearcher extends Searcher { if (hit instanceof HitGroup) { groups.add((HitGroup)hit); hitIterator.remove(); - } else if(!hit.isMeta()) { + } else if ( ! hit.isMeta()) { foundNonGroup = true; } } - if(foundNonGroup) { + if( foundNonGroup) { result.hits().addError(ErrorMessage.createUnspecifiedError("Blendingsearcher could not blend - there are toplevel hits" + - " that are not hitgroups")); + " that are not hitgroups")); return result; } if (groups.size() == 0) { |