Loading TOC...
Query Console User Guide (PDF)

Query Console User Guide — Chapter 1

Introduction to Query Console

Query Console is an interactive web-based query development tool for writing and executing ad-hoc queries in XQuery, Server-Side JavaScript, SQL and SPARQL. Query Console enables you to quickly test code snippets, debug problems, profile queries, and run administrative XQuery scripts.

The following terms and definitions cover the primary Query Console components:

TermDefinition
queryAny executable block of XQuery, Server-Side JavaScript, SQL, or SPARQL. When you run a query in Query Console, you can view the results in your choice of formats.
workspaceA collection of queries. Use workspaces to organize your queries. You can create multiple workspaces, but only one is active at a time.
historyA record of previously executed versions of a query. Each time you execute a query in Query Console, its query text is saved in the history. Use the history to restore a query to a previous state.
content sourceThe database and App Server combination against which your query executes. Query Console automatically builds a list of available content sources for your MarkLogic Server and makes it available in the Content Source list.

Using Query Console, you can:

  • Create queries in JavaScript, XQuery, SQL, or SPARQL.
  • Modify, delete and rename queries.
  • Run a query and view the output in multiple formats.
  • Profile query performance (XQuery only).
  • Explore the contents of a database.
  • Create, delete, copy, or rename workspaces to improve query organization.
  • Restore a query to a previous version from its saved history.
  • Export and import workspaces for easy sharing among users or across MarkLogic Server instances.

The workspaces and queries created in Query Console are stored in MarkLogic Server, so they are available to you from any computer with access to your MarkLogic Server instance. For example, you can create workspaces and queries on your desktop computer and use them from a lab machine with access to the same MarkLogic Server instance.

The picture below summarizes key Query Console UI features. For more information on using specific features, see the Query Console Walkthrough.

You should only have one Query Console session active at a time for any given MarkLogic user. Query Console saves state to MarkLogic Server. If a user has multiple Query Console sessions active concurrently, the state can become inconsistent.

« Table of contents
Next chapter »
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy