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

Ron Hitchens ron at ronsoft.com
Tue Mar 20 05:29:25 PDT 2012


   Is there only one meta:Country element per document?  If
there is more than one per document, if at least one contains
the value you're searching for, its URI will be selected.

   Are you really expecting up to 500 million URI strings?

On Mar 20, 2012, at 12:17 PM, amit gope 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

---
Ron Hitchens {mailto:ron at ronsoft.com}   Ronsoft Technologies
     +44 7879 358 212 (voice)          http://www.ronsoft.com
     +1 707 924 3878 (fax)              Bit Twiddling At Its Finest
"No amount of belief establishes any fact." -Unknown






More information about the General mailing list