Preserve SearchBuilder API
@@ -400,9 +400,14 @@ public class SearchBuilder {
}
public static SearchBuilder createFromDirectory(String dir,
RankProfileRegistry rankProfileRegistry) throws IOException, ParseException {
+ return createFromDirectory(dir, rankProfileRegistry, createQueryProfileRegistryFromDirectory(dir));
+ }
+ public static SearchBuilder createFromDirectory(String dir,
+ RankProfileRegistry rankProfileRegistry,
+ QueryProfileRegistry queryProfileRegistry) throws IOException, ParseException {
SearchBuilder builder = new SearchBuilder(MockApplicationPackage.fromSearchDefinitionDirectory(dir),
rankProfileRegistry,
- createQueryProfileRegistryFromDirectory(dir));
+ queryProfileRegistry);
for (Iterator<Path> i = Files.list(new File(dir).toPath()).filter(p -> p.getFileName().toString().endsWith(".sd")).iterator(); i.hasNext(); ) {
builder.importFile(i.next());
}
