blob: 3df0c1f9953745319e3643da63d11b53d09588bb (
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition;
import com.yahoo.searchdefinition.parser.ParseException;
import com.yahoo.config.application.api.ApplicationPackage;
import com.yahoo.config.application.api.DeployLogger;
import com.yahoo.vespa.model.container.search.QueryProfiles;
import java.io.IOException;
/**
* A SearchBuilder that does not run the processing chain for searches
*
*/
public class UnprocessingSearchBuilder extends SearchBuilder {
public UnprocessingSearchBuilder(ApplicationPackage app, RankProfileRegistry rankProfileRegistry) {
super(app, rankProfileRegistry);
}
public UnprocessingSearchBuilder() {
super();
}
public UnprocessingSearchBuilder(RankProfileRegistry rankProfileRegistry) {
super(rankProfileRegistry);
}
@Override
public void process(Search search, DeployLogger deployLogger, QueryProfiles queryProfiles) {
// empty
}
public static Search buildUnprocessedFromFile(String fileName) throws IOException, ParseException {
SearchBuilder builder = new UnprocessingSearchBuilder();
builder.importFile(fileName);
builder.build();
return builder.getSearch();
}
}
|