Welcome to the MarkLogic Server playground!

This tutorial gets you started writing queries against MarkLogic Server. We'll begin with some simple one-liner queries, progress to some modular programs, and along the way explore how to use XPath, XQuery, and MarkLogic's Search API.

We assume you know the basics. If you're truly brand new, you should probably jump out and find some introductory material, then come back.

All the sample code you'll see is live and you're invited to execute it as we go along. You can (and should) tweak it with your own changes. For a test data set, we've loaded roughly 5,000,000 emails that were copied over from the MarkMail.org site. Each email is represented by an XML document, and for mails that have attachments they're held in separate binary documents within the database with links in the main XML document.

We've placed the data on a single shared RackSpace virtualized machine. We're using security rules so you (as a public user) can read, but not write, to the database, and each query is allowed a maximum of 10 seconds to complete before it's forcibly killed.

You may want to refer to the API documentation as you follow along.

Lay of the Land

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