I think Mike answered in this case. exists(doc) is the same as fn:exists(doc) unless you mess with the default function namespace. Or maybe I'm seeing the emails out of order...
Now how to find out generically which functions lock for read... I don't know for sure, but in this case the documentation suggests that xdmp:exists only requires a "partial search" or something like that, which may be a clue. On Thu, Apr 25, 2013 at 8:20 PM, Tim Finney <[email protected]> wrote: > Hi Stu, > > This is a good question. exists(doc) does seem to put a read lock on the > doc. I don't know how to find out which functions put read or update > locks on a doc but would like to know. > > Best, > > Tim > > On 04/25/2013 11:10 PM, [email protected] wrote: > > Date: Thu, 25 Apr 2013 07:44:53 -0700 > > From: Stu Salsbury<[email protected]> > > Subject: Re: [MarkLogic Dev General] How to test whether doc exists > > To: MarkLogic Developer Discussion<[email protected]> > > Message-ID: > > <CACi3uCtTDy1VgTs8J+zH1QH_fjoKD1diH+jMbE+6_v8= > [email protected]> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Concerning: > > > > exists(doc($URI)): 80 us (microseconds) > > doc-available($URI): 200 us > > > > Would the first option (using doc($URI)) put a read lock on the file? > And > > the second not? Just wondering about side effects of the test. > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general >
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
