use of com.yahoo.searchdefinition.SearchBuilder 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