diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-30 13:20:49 -0500 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-30 13:20:49 -0500 |
commit | 40144341bdbbfcec9f21ee3784e3e3cf5e320c91 (patch) | |
tree | f21c5039c36cc550efcfeaf9fbd77e7c2e9434d3 /container-search | |
parent | 32a5521059e08308b5abae10d6b5e8ce1589e705 (diff) |
Output the intermediate graph
Diffstat (limited to 'container-search')
-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) { |