aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/search/searchchain/config/test/searcher1-2.2/Searcher1.java.text
blob: 413575aca39471c3449059c1707c66f2b7d00725 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.yahoo.search.searchchain.config.test.searcher1;

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

/**
 * @author bratseth
 */
public class Searcher1 extends Searcher {

    public @Override Result search(Query query,Execution execution) {
        Result result=execution.search(query);
        if (result==null)
            result=new Result(query);
        result.hits().add(new Hit("from:searcher1:2.2"));
        return result;
    }

}