aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/searchchain/testutil/DocumentSourceSearcher.java
diff options
context:
space:
mode:
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.java11
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;
}