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
- Find what you're looking for with powerful, flexible search
- Keep data safe with ACID transactions
- Understand your data with aggregate functions
- Follow changes through alerting
- Localize searches with geospatial features
Pure Java query builder and conveniences for POJOs, JSON, XML, and binary I/O
- Use the structured query builder or define a query string
- Persist POJOs as JSON objects
- Perform CRUD operations on JSON, XML, binaries, and text
Built-in extensibility for moving performance-critical code to the database
- Configure the REST application server
- Benefit from built-in features, extend the API for your application logic
Move faster to production with proven reliability at scale
- Be there when your customers need you with high availability
- Scale out with a shared-nothing cluster architecture
- Control costs with tiered storage
- Control who sees what with robust security
Always open source on GitHub
- Request features and fixes
- Accelerate tool development by contributing enhancements
Next Steps
- Deeper Dive
- Java Client API on GitHub
- Java Application Developer's Guide -- Getting Started
- Samplestack -- example application based on the reference architecture
- MarkLogic University's free MarkLogic Fundamentals course