@Test public void testStringQuery() throws Exception { StringQueryDefinition query = client.newQueryManager().newStringDefinition().withCriteria("John AND dept:HR"); query.setCollections(qhbTestCollection); query.setOptionsName("employees"); Map<String, String[]> matchesByForest = new HashMap<>(); matchesByForest.put("java-unittest-1", new String[] {uri1, uri3, uri4}); matchesByForest.put("java-unittest-2", new String[] {}); matchesByForest.put("java-unittest-3", new String[] {}); runQueryBatcher(moveMgr.newQueryBatcher(query), query, matchesByForest, 99, 17); }
qdef.setIncludeDefaultRulesets(false); qdef.setCollections(localGraphUri); qdef.setConstrainingQueryDefinition(queryMgr.newStringDefinition().withCriteria("test1")); JsonNode jsonResults = smgr.executeSelect(qdef, new JacksonHandle()).get(); JsonNode tuples = jsonResults.path("results").path("bindings");
docMgr.write(writeSet, null, null, temporalCollection); StringQueryDefinition query = queryMgr.newStringDefinition().withCriteria(uniqueBulkTerm); try ( DocumentPage page = docMgr.search(query, 0) ) { assertEquals("Wrong number of results", 8, page.size());