Loading TOC...

MarkLogic 12 EA 1 Product Documentation
xdmp.queryTrace

xdmp.queryTrace(
   enabled as Boolean
) as null

Summary

Enables or disables tracing of this query. When query tracing is enabled, "info" level messages are logged detailing the search optimizations performed.

Parameters
enabled Specify true to enable query tracing, false to disenable query tracing.

Usage Notes

Search optimizations are performed in three phases:

the path analysis phase
In this phase a path expression is analyzed to determine whether it can be executed in whole or in part through an optimized search. Each individual component of the path is analyzed to see if it is searchable. The searchablity of each path component is logged.
the search constraint gathering phase
In this phase, search constraints are gathered from the path expression components. The number of constraints contributed by each path component is logged.
the search execution phase
In this phase, a search is performed using the gathered constraints. The actual number of fragments selected for filtering is logged.

Example

xdmp.queryTrace(true);
=> ()

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