use of com.yahoo.searchdefinition.UnprocessingSearchBuilder in project vespa by vespa-engine.
the class Deriver method getUnprocessingSearchBuilder.
public static SearchBuilder getUnprocessingSearchBuilder(List<String> sds) {
SearchBuilder builder = new UnprocessingSearchBuilder();
try {
for (String s : sds) {
builder.importFile(s);
}
} catch (ParseException | IOException e) {
throw new IllegalArgumentException(e);
}
builder.build();
return builder;
}
use of com.yahoo.searchdefinition.UnprocessingSearchBuilder in project vespa by vespa-engine.
the class DocumentGenMojo method buildSearches.
private SearchBuilder buildSearches(File sdDir) {
File[] sdFiles = sdDir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.endsWith(".sd");
}
});
SearchBuilder builder = new UnprocessingSearchBuilder();
for (File f : sdFiles) {
try {
long modTime = f.lastModified();
if (modTime > newestModifiedTime) {
newestModifiedTime = modTime;
}
builder.importFile(f.getAbsolutePath());
} catch (ParseException | IOException e) {
throw new IllegalArgumentException(e);
}
}
builder.build();
for (Search search : builder.getSearchList()) {
this.searches.put(search.getName(), search);
}
return builder;
}
Aggregations