How to print query statement being executed by cts:search

Issues related to W3C XQuery.
vkdev
Posts: 21

How to print query statement being executed by cts:search

Fri Feb 03, 2017 5:05 pm

Is it possible to see or print the full query that a cts:search executed? Like when we use hibernate, we can turn on a logging flag to trace the slq query statement and also the bind parameters that it used.
Is a similar feature of logging the executed query statement on oxygenxml console please?
alex_jitianu
Posts: 600

Re: How to print query statement being executed by cts:search

Mon Feb 06, 2017 10:51 am

Hi,

From the cts:search documentation I see that they recommend using xdmp:query-trace(true()) . Calling this before the cts:search() will print logging information to the error log. The error log location is system dependent. Unfortunately, from Oxygen, the only way to see these logs is to:
1. present the XQuery/XPath Builder (from Window->Show view)
2. select the MarkLogic connection from the view's toolbar
3. run a query like this (please make sure you use the proper path depending on the OS where the ML server is running):

Code: Select all

xdmp:document-get("/var/opt/MarkLogic/Logs/ErrorLog.txt")


Best regards,
Alex

Return to “XQuery”

Who is online

Users browsing this forum: No registered users and 0 guests