[MarkLogic Dev General] simple cts constructor for variable check
john.snelson at marklogic.com
Mon Apr 16 08:53:25 PDT 2012
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
On 16/04/12 16:21, Gary Larsen wrote:
> 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:
> [fn:not(fn:exists($oc)) or$oc =nv:lookupInfo/nv:objectClass]
> [$effect ne'spec'ornv:sync/nv:archived]
> [$effect ne'security'ornvdiff:diff/nv:content/nv:crnData8[nv:policies
> For example I would like to turn this portion into a cts:or-query
> $effect ne'spec'ornv:sync/nv:archived
> For second part I can use a cts:element-value-query(). I need something
> for the first part.
> Or maybe I’m looking at this all wrong. Thanks for any suggestions.
John Snelson, Lead Engineer http://twitter.com/jpcs
MarkLogic Corporation http://www.marklogic.com
More information about the General