Hi I am new to MarkLogic and while reading ML documentation i found that Performance of Executing CTS Query is Better than Executing Plain XQuery.
Requirement : I need to Convert Below XQuery to CTS Query to Perform Search for XPath and its Values and also i don't want to create Path Range Index for XPath because I am getting Xpath Dynamically.
for $document in collection()[/tXML/Message/TEST/TEST1/TESTID="10"]
return
(
if(fn:not(fn:empty($document/tXML/Message/TEST/TESTID))) then $document/tXML/Message/TEST/TESTID else "NULL",
if(fn:not(fn:empty($document/tXML/Message/TEST/TESTType))) then $document/tXML/Message/TEST/TESTType else "NULL",
if(fn:not(fn:empty($document/tXML/Message/TEST/TESTStatus))) then $document/tXML/Message/TEST/TESTStatus else "NULL"
)
So Please Help me to find out whether it is possible to form CTS Query for Above XQuery.
getting XPath Dynamicallybit? Is it passed in as string or such? Beware of code injection.. - grtjn