aboutsummaryrefslogtreecommitdiffstats
path: root/application/src/test/java/com/yahoo/application/container/searchers/MockSearcher.java
blob: c38ffe23294715f563d86a15fa473e1ca21d6eeb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.application.container.searchers;

import com.yahoo.search.Query;
import com.yahoo.search.Result;
import com.yahoo.search.Searcher;
import com.yahoo.search.result.Hit;
import com.yahoo.search.result.HitGroup;
import com.yahoo.search.searchchain.Execution;

/**
 * @author Christian Andersen
 */
public class MockSearcher extends Searcher {

    @Override
    public Result search(Query query, Execution execution) {
        HitGroup hits = new HitGroup();
        hits.add(new Hit("foo", query));
        return new Result(query, hits);
    }

}