diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-05-27 13:05:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-27 13:05:31 +0200 |
commit | c4f1deffdcab1a65d4aa64de840c909db929d4d4 (patch) | |
tree | 82018910c9c970d7cd3b3380621bedd2d8031b5c /container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java | |
parent | a940c9883183a8697fc5fa389355789d1d47f5b6 (diff) |
Revert "Bratseth/iterate over indexes not fields 2"
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java b/container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java index f4973ba4239..56a6a702962 100644 --- a/container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java +++ b/container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java @@ -28,7 +28,7 @@ import com.yahoo.search.searchchain.Execution; * Any field in the configured hits which has a name starting by attribute * will be returned when attribute prefetch filling is requested.</p> * - * @author bratseth + * @author bratseth */ public class DocumentSourceSearcher extends Searcher { @@ -85,6 +85,7 @@ public class DocumentSourceSearcher extends Searcher { private void addDefaultResults() { Query q = new Query("?query=default"); Result r = new Result(q); + // These four used to assign collapseId 1,2,3,4 - re-add that if needed r.hits().add(new Hit("http://default-1.html", 0)); r.hits().add(new Hit("http://default-2.html", 0)); r.hits().add(new Hit("http://default-3.html", 0)); @@ -96,7 +97,8 @@ public class DocumentSourceSearcher extends Searcher { @Override public Result search(Query query, Execution execution) { queryCount++; - Result r = unFilledResults.get(getQueryKeyClone(query)); + Result r; + r = unFilledResults.get(getQueryKeyClone(query)); if (r == null) { r = defaultFilledResult.clone(); } else { @@ -109,13 +111,12 @@ public class DocumentSourceSearcher extends Searcher { } /** - * Returns a query clone which has sourcr, offset and hits set to null. This is used by access to + * Returns a query clone which has offset and hits set to null. This is used by access to * the maps using the query as key to achieve lookup independent of offset/hits value */ private Query getQueryKeyClone(Query query) { - Query key = query.clone(); + Query key=query.clone(); key.setWindow(0,0); - key.getModel().setSources(""); return key; } |