[MarkLogic Dev General] General Digest, Vol 93, Issue 3

David Swearingen dswearingen at 42six.com
Thu Mar 1 15:09:58 PST 2012


Thanks very much.  I should have said we are on 4.2.  I'll assume that
Mike's comment that "It looks to me like doc-available($uri) is equivalent
to xdmp:exists(doc($uri)) now" applies to 4.2 also and not just 5.0 unless
I hear otherwise...not sure how I would verify that myself.  I don't have
access to prod so that's why I can't simply test this.  Thanks again.

David


On Thu, Mar 1, 2012 at 4:51 PM, <general-request at developer.marklogic.com>wrote:

> Send General mailing list submissions to
>        general at developer.marklogic.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://developer.marklogic.com/mailman/listinfo/general
> or, via email, send a message with subject or body 'help' to
>        general-request at developer.marklogic.com
>
> You can reach the person managing the list at
>        general-owner at developer.marklogic.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of General digest..."
>
>
> Today's Topics:
>
>   1. Is fn:doc-available() high performance, or should we use
>      something else like cts:uri-match()? (David Swearingen)
>   2. Re: Is fn:doc-available() high performance, or should we use
>      something else like cts:uri-match()? (Danny Sokolsky)
>   3. Re: Is fn:doc-available() high performance,       or should we use
>      something else like cts:uri-match()? (Michael Blakeley)
>   4. cts:element-query  3rd parameter? (William Merritt Sawyer)
>   5. Re: Is fn:doc-available() high performance,       or should we use
>      something else like cts:uri-match()? (Danny Sokolsky)
>   6. Re: element-query  3rd parameter? (Danny Sokolsky)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 1 Mar 2012 16:15:20 -0500
> From: David Swearingen <dswearingen at 42six.com>
> Subject: [MarkLogic Dev General] Is fn:doc-available() high
>        performance, or should we use something else like cts:uri-match()?
> To: general at developer.marklogic.com
> Message-ID:
>        <CAG-P1=RSJ0PCgZq4X2UR8eRTR2CXgW+dYjUYKDY=qe69mGkocA at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> We have a system with a million or so records.  When attempting to discern
> if a doc with a given uri is in the system, what's the fastest method?
> Thanks.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://developer.marklogic.com/pipermail/general/attachments/20120301/4f2ff09a/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Thu, 1 Mar 2012 13:25:25 -0800
> From: Danny Sokolsky <Danny.Sokolsky at marklogic.com>
> Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high
>        performance, or should we use something else like cts:uri-match()?
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> Message-ID:
>        <C9924D15B04672479B089F7D55FFC1322261F34347 at EXCHG-BE.marklogic.com>
> Content-Type: text/plain; charset="us-ascii"
>
> xdmp:exists(fn:doc("/my/uri.xml"))
>
> will be fast.
>
> The uri lexicon functions are also a good choice.
>
> -Danny
>
>
>
> From: general-bounces at developer.marklogic.com [mailto:
> general-bounces at developer.marklogic.com] On Behalf Of David Swearingen
> Sent: Thursday, March 01, 2012 1:15 PM
> To: general at developer.marklogic.com
> Subject: [MarkLogic Dev General] Is fn:doc-available() high performance,
> or should we use something else like cts:uri-match()?
>
> We have a system with a million or so records.  When attempting to discern
> if a doc with a given uri is in the system, what's the fastest method?
>  Thanks.
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://developer.marklogic.com/pipermail/general/attachments/20120301/a9cef056/attachment-0001.html
>
> ------------------------------
>
> Message: 3
> Date: Thu, 1 Mar 2012 13:30:47 -0800
> From: Michael Blakeley <mike at blakeley.com>
> Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high
>        performance,    or should we use something else like
> cts:uri-match()?
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> Message-ID: <910CA2EA-D1A3-4F2B-8BF5-CD257B4A4F6C at blakeley.com>
> Content-Type: text/plain; charset=us-ascii
>
> It looks to me like doc-available($uri) is equivalent to
> xdmp:exists(doc($uri)) now. Either expression results in a simple
> list-cache lookup, with no tree fetches and no reliable difference in
> elapsed-time.
>
> If you use a uri lexicon, probably something like exists(cts:uris($uri,
> 'limit=1')) will be faster than cts:uri-match($uri). But I think there
> might be cases where doc-available is cached and the lexicon lookup is not,
> so the lexicon lookup may not always be faster than doc-available.
>
> -- Mike
>
> On 1 Mar 2012, at 13:25 , Danny Sokolsky wrote:
>
> > xdmp:exists(fn:doc("/my/uri.xml"))
> >
> > will be fast.
> >
> > The uri lexicon functions are also a good choice.
> >
> > -Danny
> >
> >
> >
> > From: general-bounces at developer.marklogic.com [mailto:
> general-bounces at developer.marklogic.com] On Behalf OfDavid Swearingen
> > Sent: Thursday, March 01, 2012 1:15 PM
> > To: general at developer.marklogic.com
> > Subject: [MarkLogic Dev General] Is fn:doc-available() high performance,
> or should we use something else like cts:uri-match()?
> >
> > We have a system with a million or so records.  When attempting to
> discern if a doc with a given uri is in the system, what's the fastest
> method?  Thanks.
> >
> >
> > _______________________________________________
> > General mailing list
> > General at developer.marklogic.com
> > http://developer.marklogic.com/mailman/listinfo/general
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 1 Mar 2012 21:33:45 +0000
> From: William Merritt Sawyer <william.sawyer at ldschurch.org>
> Subject: [MarkLogic Dev General] cts:element-query  3rd parameter?
> To: "General at developer.marklogic.com"
>        <General at developer.marklogic.com>
> Message-ID:
>        <778056D4D061174DBB3315393CFF14EA123EF8BE at W12112.ldschurch.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I am finding cts:element-query has an optional third parameter but I am
> finding no documentation mentioning it.  Can anyone tell me what this third
> parameter is and purpose?
> Thanks,
> - Will
>
>
>  NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information. Any
> unauthorized review, use, disclosure or distribution is prohibited. If you
> are not the intended recipient, please contact the sender by reply email
> and destroy all copies of the original message.
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://developer.marklogic.com/pipermail/general/attachments/20120301/f9c360be/attachment-0001.html
>
> ------------------------------
>
> Message: 5
> Date: Thu, 1 Mar 2012 13:36:36 -0800
> From: Danny Sokolsky <Danny.Sokolsky at marklogic.com>
> Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high
>        performance,    or should we use something else like
> cts:uri-match()?
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> Message-ID:
>        <C9924D15B04672479B089F7D55FFC1322261F34358 at EXCHG-BE.marklogic.com>
> Content-Type: text/plain; charset="us-ascii"
>
> I think one advantage xdmp:exists has is that you can put any searchable
> XPath xpression in there.  So if you wanted it to return true only if a
> document had a particular element, for example, then you can do something
> like this:
>
> xdmp:exists(fn:doc("/my/uri.xml")/foo)
>
> So it depends if all you want to do is to see if the document exists or if
> you want to do more.
>
> -Danny
>
> -----Original Message-----
> From: general-bounces at developer.marklogic.com [mailto:
> general-bounces at developer.marklogic.com] On Behalf Of Michael Blakeley
> Sent: Thursday, March 01, 2012 1:31 PM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Is fn:doc-available() high
> performance, or should we use something else like cts:uri-match()?
>
> It looks to me like doc-available($uri) is equivalent to
> xdmp:exists(doc($uri)) now. Either expression results in a simple
> list-cache lookup, with no tree fetches and no reliable difference in
> elapsed-time.
>
> If you use a uri lexicon, probably something like exists(cts:uris($uri,
> 'limit=1')) will be faster than cts:uri-match($uri). But I think there
> might be cases where doc-available is cached and the lexicon lookup is not,
> so the lexicon lookup may not always be faster than doc-available.
>
> -- Mike
>
> On 1 Mar 2012, at 13:25 , Danny Sokolsky wrote:
>
> > xdmp:exists(fn:doc("/my/uri.xml"))
> >
> > will be fast.
> >
> > The uri lexicon functions are also a good choice.
> >
> > -Danny
> >
> >
> >
> > From: general-bounces at developer.marklogic.com [mailto:
> general-bounces at developer.marklogic.com] On Behalf OfDavid Swearingen
> > Sent: Thursday, March 01, 2012 1:15 PM
> > To: general at developer.marklogic.com
> > Subject: [MarkLogic Dev General] Is fn:doc-available() high performance,
> or should we use something else like cts:uri-match()?
> >
> > We have a system with a million or so records.  When attempting to
> discern if a doc with a given uri is in the system, what's the fastest
> method?  Thanks.
> >
> >
> > _______________________________________________
> > General mailing list
> > General at developer.marklogic.com
> > http://developer.marklogic.com/mailman/listinfo/general
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 1 Mar 2012 13:51:50 -0800
> From: Danny Sokolsky <Danny.Sokolsky at marklogic.com>
> Subject: Re: [MarkLogic Dev General] element-query  3rd parameter?
> To: MarkLogic Developer Discussion <general at developer.marklogic.com>
> Message-ID:
>        <C9924D15B04672479B089F7D55FFC1322261F3435F at EXCHG-BE.marklogic.com>
> Content-Type: text/plain; charset="us-ascii"
>
> I am not positive, but I think the 3rd param is for options, but there are
> no options to cts:element-query, so it there is no documentation for it.
>
> -Danny
>
> From: general-bounces at developer.marklogic.com [mailto:
> general-bounces at developer.marklogic.com] On Behalf Of William Merritt
> Sawyer
> Sent: Thursday, March 01, 2012 1:34 PM
> To: General at developer.marklogic.com
> Subject: [MarkLogic Dev General] cts:element-query 3rd parameter?
>
> I am finding cts:element-query has an optional third parameter but I am
> finding no documentation mentioning it.  Can anyone tell me what this third
> parameter is and purpose?
> Thanks,
> - Will
>
>
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information. Any
> unauthorized review, use, disclosure or distribution is prohibited. If you
> are not the intended recipient, please contact the sender by reply email
> and destroy all copies of the original message.
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://developer.marklogic.com/pipermail/general/attachments/20120301/f877ec2f/attachment.html
>
> ------------------------------
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
>
> End of General Digest, Vol 93, Issue 3
> **************************************
>



-- 
---------------------
703-517-6910 mobile
Skype: gaudimila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120301/89c1c471/attachment-0001.html 


More information about the General mailing list