Hi Mike,

Is it true that putting a cts:query constraint on the lexicon to effectively
filter out any deleted entries only applies when the person running the
query has admin privileges?  If so, how would one go about creating a
different set of user permissions to avoid querying deleted docs?

Thank you!

Tim Meagher - AAOM Consulting

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Danny Sokolsky
Sent: Monday, May 18, 2009 12:18 PM
To: General Mark Logic Developer Discussion
Subject: RE: [MarkLogic Dev General] updating lexicons when documents
aredeleted

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: [email protected]
[mailto:[email protected]] 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
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
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