You can request documents in the catalog. Something in the following lines should work:
DatabaseClient client = DatabaseClientFactory.newClient(...);
GenericDocumentManager docMgr = client.newDocumentManager()
QueryManager queryMgr = client.newQueryManager();
StructuredQueryBuilder queryBldr = new StructuredQueryBuilder();
for (int pageNo=1; pageNo < YOUR_MAXIMUM_BEFORE_STOPPING; pageNo++) {
SearchHandle resultsHandle = queryMgr.search(
queryBldr.directory(true, "/Downloads/Current/com.crc.eng.dollar/"),
new SearchHandle(),
pageNo
);
MatchDocumentSummary[] docSummaries = resultsHandle.getMatchResults();
for (MatchDocumentSummary docSummary: docSummaries) {
InputStreamHandle docHandle = docMgr.read(
docSummary.getUri(), new InputStreamHandle()
);
}
if (docSummaries.length < queryMgr.getPageLength()) {
break;
}
}
To make the query more efficient, save the query parameters with the fragment transformation set to empty and define the query parameters when creating the query builder.
JSON XML, .
, MarkLogic 8 .
:
http://docs.marklogic.com/javadoc/client/index.html
http://docs.marklogic.com/guide/java