"<cts:text>groundbreaking</cts:text></cts:word-query>"; StringHandle handle = new StringHandle().with(wordQuery); RawCtsQueryDefinition querydef = queryMgr.newRawCtsQueryDefinition(handle).withCriteria("Memex");
@Test public void testRawCtsQuery() throws Exception { String ctsQuery = "<cts:directory-query xmlns:cts=\"http://marklogic.com/cts\"><cts:uri>/QueryBatcherTest/</cts:uri></cts:directory-query>"; RawCtsQueryDefinition query = client.newQueryManager().newRawCtsQueryDefinition(new StringHandle().with(ctsQuery).withFormat(Format.XML)).withCriteria("Jane"); Map<String, String[]> matchesByForest = new HashMap<>(); matchesByForest.put("java-unittest-3", new String[] {uri2}); runQueryBatcher(moveMgr.newQueryBatcher(query), query, matchesByForest, 1, 2); ctsQuery = "{ctsquery : {\"directoryQuery\":{\"uris\":[\"/QueryBatcherTest/\"]}}}";; matchesByForest.put("java-unittest-1", new String[] {uri1, uri3, uri4}); matchesByForest.put("java-unittest-2", new String[] {uri5}); query = client.newQueryManager().newRawCtsQueryDefinition(new StringHandle().with(ctsQuery).withFormat(Format.JSON)); runQueryBatcher(moveMgr.newQueryBatcher(query), query, matchesByForest, 1, 2); }