[MarkLogic Dev General] updating lexicons when documents are deleted

Mike Sokolov sokolov at ifactory.com
Mon May 18 10:52:23 PDT 2009


Thanks, Danny

Danny Sokolsky wrote:
> Hi Mike,
>
> The lexicon will purge deleted documents after the stands holding the deleted documents are merged.
>
> Another thing you can do is to put a cts:query constraint on the lexicon, and that constraint will effectively filter out any deleted entries.  If you want to still look through the whole database, an empty cts:and-query matches everything.  
>
> Here is an example from cts:words apidoc that demonstrates this:
>
> If the $query parameter is not present and the current user is assigned the admin role, words from deleted fragments not yet expunged by a merge may be included. Users who are not part of the admin role will not see words from deleted fragments. To filter deleted fragments for the admin role case, use a $query parameter. For example, the following query returns all documents, but would have the effect of filtering out deleted fragments for admin users:
>
>     cts:words("abc", (), cts:and-query( () ) )
>
> -Danny
>
>
> -----Original Message-----
> From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Mike Sokolov
> Sent: Monday, May 18, 2009 7:25 AM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] updating lexicons when documents are deleted
>
> Is there any way to update a lexicon to reflect the effect of having 
> deleted some documents short of forcing a total re-index?
>
> I have even tried removing and re-creating the lexicon, but this seems 
> to have no effect!  Is that possible?
>
>
> -Mike 
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
>   


More information about the General mailing list