I'm using MarkLogic client API, and I want to cache the query like cts:register in XQuery.
In XQuery code, we are using this:
let $query := "title:risk"
let $final-query :=
cts:register(cts:query(search:parse($query,
<options xmlns="http://marklogic.com/appservices/search">
.......
</options>)))
return cts:search(/, $final-query)
I know that this code will generate a number like 56933683224713984 , and we can get some benefits from MarkLogic optimizing.
However, MarkLoigc client API can't give an API like register query.
How can I optimize my Java code? I worry that MarkLogic can't handle the original query(not registered) and the performance may not be good.
MarkLogic-8 & client-api-4.04