t: Re: [MarkLogic Dev General] simple cts constructor for variable
check
Unless I'm missing something, you shouldn't need the eval. Constructors for
cts:query are already fully composable. See the if-then-else expression that
I outlined below.
-- Mike
On 16 Apr 2012, at 09:04 , Gary Larse
To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] simple cts constructor for variable
> check
>
> The quick answer is something like:
>
> if ($oc) then () else cts:element-value-query(xs:QName(nv:objectClass),
> $oc)
>
> When $oc is empty, there i
scussion
Subject: Re: [MarkLogic Dev General] simple cts constructor for variable
check
The quick answer is something like:
if ($oc) then () else cts:element-value-query(xs:QName(nv:objectClass),
$oc)
When $oc is empty, there is no need to include that query term at all. So it
can be empty too
Only add the cts:element-value-query() to your cts:query object if
"$effect eq 'spec'". In other words, do the comparison outside the
cts:query, and build a different cts:query depending on the value of the
variables.
John
On 16/04/12 16:21, Gary Larsen wrote:
> Hi
>
> I’m trying to convert a
The quick answer is something like:
if ($oc) then () else cts:element-value-query(xs:QName(nv:objectClass), $oc)
When $oc is empty, there is no need to include that query term at all. So it
can be empty too.
However, the long answer is that converting an XPath expression to cts:query
won't n
Hi
I'm trying to convert a query to use cts for performance. Is there a cts
constructor that I can use the check a variable?
Here's a portion of the query:
xdmp:directory('/db/netvisn/audit_history/','infinity')
/nv:auditHistory
[fn:not(fn:exis