@Test public void query_profile() throws Exception { try (Application app = Application.fromBuilder(new Application.Builder() .queryProfile("default", "<query-profile id=\"default\">\n" + "<field name=\"defaultage\">7d</field>\n" + "</query-profile>") .queryProfileType("type", "<query-profile-type id=\"type\">\n" + "<field name=\"defaultage\" type=\"string\" />\n" + "</query-profile-type>") .rankExpression("re", "commonfirstphase(globalstaticrank)") .documentType("test", new String(this.getClass().getResourceAsStream("/test.sd").readAllBytes(), StandardCharsets.UTF_8)) .container("default", new Application.Builder.Container() .search(true) ))) { Application unused = app; } }
@Beta public static Application fromBuilder(Builder builder) throws Exception { return builder.build(); }
Application implements AutoCloseable { @Beta public static Application fromBuilder(Builder builder) throws Exception { return builder.build(); } }
Application implements AutoCloseable { @Beta public static Application fromBuilder(Builder builder) throws Exception { return builder.build(); } Application(Path path, Networking networking, boolean deletePathWhenClosing); }
Application implements AutoCloseable { @Beta public static Application fromBuilder(Builder builder) throws Exception { return builder.build(); } Application(Path path, Networking networking, boolean deletePathWhenClosing); @Beta static Application fromBuilder(Builder builder); static Application fromServicesXml(String xml, Networking networking); static Application fromApplicationPackage(Path path, Networking networking); static Application fromApplicationPackage(File file, Networking networking); JDisc getJDisc(String id); @Override void close(); }
Application implements AutoCloseable { @Beta public static Application fromBuilder(Builder builder) throws Exception { return builder.build(); } Application(Path path, Networking networking, boolean deletePathWhenClosing); @Beta static Application fromBuilder(Builder builder); static Application fromServicesXml(String xml, Networking networking); static Application fromApplicationPackage(Path path, Networking networking); static Application fromApplicationPackage(File file, Networking networking); JDisc getJDisc(String id); @Override void close(); static final String vespaLocalProperty; }