[MarkLogic Dev General] determining which indexes exist for adatabase

Michael Sokolov sokolov at ifactory.com
Fri Feb 22 10:32:16 PST 2008


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: general-bounces at developer.marklogic.com 
> [mailto:general-bounces at developer.marklogic.com] 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
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
> 



More information about the General mailing list