[MarkLogic Dev General] cts:uri query problem

JASPREET SINGH singh.jassidun at gmail.com
Tue Mar 20 04:33:29 PDT 2012


Hi ,

My query fetches uri's for those documents which checks meta:Country value
and then produces the result.

For Eg. in the query mentioned below the meta:Country value is China. Now
the issue is that the DB has values like:

   1.  'Chin',
   2. '(China);'
   3. ' (China)'
   4. 'China'.
   5. '[space]China'
   6. 'China>'

 But every time it gives the same result count along with the same set of
URI's. Please suggest what should i change in the query so that i get the
desired result .
let $options := ('exact')
let $uri :=cts:uris('', ('document','limit=500000000'),
            (cts:and-query((cts:directory-query('/content/', 'infinity'),
             cts:element-value-query(xs:QName('meta:Country'), '
China',$options)), ())), (), ())

return (count($uri))

Altogether, I need some option in cts:query to match the value matching
regular expression.


regards,
Jaspreet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120320/758edc2f/attachment.html 


More information about the General mailing list