The best I have come up with for this is:

let $has-uri-lexicon := try { cts:uris()[1], true() } catch { false() }
return
... if ($has-uri-lexicon) ...

Mark Logic people ; is there better?  What can we do for other sorts of
indexes?

We would really love to be able to get a list of all indexes, plus ideally
statistics on those indexes (how many keys, how many fragments mapped to,
how many bytes storage on disk, etc.)  Another nice feature would be to
track how "useful" the index was in some way: how many searches resolved?

-Mike

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Alan Darnell
> Sent: Friday, February 22, 2008 1:19 PM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] determining which indexes 
> exist for adatabase
> 
> Is there an API that can be used to scope out what indexes 
> and/or lexicons have been defined for any particular 
> database?  For instance, if you have a URI lexicon enabled, 
> then it might be faster to use cts:uri-match than some other 
> method to determine if a URI already exists in the database.  
> It would be nice to write portable code, however, that could 
> adjust to whatever was available for a database.
> 
> Alan
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
> 

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to