MarkLogic Java Client API

The MarkLogic Java Client API is an open-source library that allows developers to quickly, easily, and reliably access MarkLogic from their Java applications.

  DatabaseClient client = Configuration.exampleClient();

  // Build a structured query. Here we're doing a pretty broad collection query 
  StructuredQueryBuilder builder = client.newQueryManager()
    .newStructuredQueryBuilder();
  QueryDefinition query = builder.and(builder.collection("sample data"));

  DocumentPage page = client.newDocumentManager().search(query, 1);

  // Iterate through the results, which include the raw documents,
  // available with a ReadHandle.
  for (DocumentRecord doc : page) {
    System.out.println(doc.getContent(new JacksonParserHandle()));
  }

Faster development and less custom code with out-of-the-box data management, search, and alerting

Pure Java query builder and conveniences for POJOs, JSON, XML, and binary I/O

Built-in extensibility for moving performance-critical code to the database

Move faster to production with proven reliability at scale

Always open source on GitHub

Next Steps

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.