[MarkLogic Dev General] options not working with in cts:uri query

Clark Richey Clark.Richey at marklogic.com
Tue Mar 20 05:48:26 PDT 2012


Why are you expecting the same query to return different uris and counts?

----
Sent from my iPad

Clark D. Richey, Jr.
Principal Technologist, Federal
MarkLogic
+1 240 252 7507 Cell
Clark.Richey at marklogic.com


1600 Tysons Blvd., 8th Floor
McLean, VA 22102
www.marklogic.com
 
This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation.

On Mar 20, 2012, at 8:14 AM, "amit gope" <amitgope2 at gmail.com> wrote:

> 
> 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 India. Now the issue is that the DB has values like:
> 
>  'Ind',
> '(India);'
> ' (Indias)'
> 'India'.
> '[space]India'
> 'India>'
> 'Indian'
>  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 or in the options 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'), ' India',$options)), ())), (), ())
> 
> return (count($uri),$uri)
> 
> Thanks in Advance.
> 
> Regards
> Amit 
> 
> 
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general


More information about the General mailing list