[MarkLogic Dev General] RE: General Digest, Vol 31, Issue 10
Kelly Stirman
kelly at marklogic.com
Wed Jan 10 12:51:39 PST 2007
Patrick,
>From your example, it does not appear as if you are using namespaces for your elements or attributes, so you can leave the values for parent namespace uri empty.
The element attribute range index is specific to the element/attribute combination, so if you have an index attribute for RootElement and an index attribute for InsurancePolicy, you would need a separate entry for both.
Otherwise I think you are on the right path - the range index will return all the values very quickly, and you will then be able to speed up your max() call. Keep in mind that you can also pass a cts:query to the cts:element-attribute-values() call if you want to get the max for only the results of a particular query.
Hope this helps, and please report back on your progress.
Thanks,
Kelly
________________________________
From: general-bounces at developer.marklogic.com on behalf of general-request at developer.marklogic.com
Sent: Wed 1/10/2007 3:00 PM
To: general at developer.marklogic.com
Subject: General Digest, Vol 31, Issue 10
Send General mailing list submissions to
general at developer.marklogic.com
To subscribe or unsubscribe via the World Wide Web, visit
http://xqzone.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. Re: RE: General Digest, Vol 31, Issue 8 (Mike Sokolov)
2. CMS apis (venkatesh.sheshgiri at wipro.com)
3. max function alternatives (Patrick Force)
----------------------------------------------------------------------
Message: 1
Date: Wed, 10 Jan 2007 08:35:26 -0500
From: Mike Sokolov <sokolov at ifactory.com>
Subject: Re: [MarkLogic Dev General] RE: General Digest, Vol 31, Issue
8
To: General Mark Logic Developer Discussion
<general at developer.marklogic.com>
Message-ID: <45A4EB9E.9080704 at ifactory.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
There is a cms api? Is it documented anywhere? Is it good?
Kelly Stirman wrote:
> What is the error you are getting?
>
> If you are using the cms api, cms:check-in() requires that the document
> be checked out before it can be checked in.
>
> Kelly
>
>
------------------------------
Message: 2
Date: Wed, 10 Jan 2007 19:13:19 +0530
From: <venkatesh.sheshgiri at wipro.com>
Subject: [MarkLogic Dev General] CMS apis
To: <general at developer.marklogic.com>
Message-ID:
<67B72BAF01E9A540B4B1F7D031F6D98903A6AD1C at BLR-EC-MBX05.wipro.com>
Content-Type: text/plain; charset="us-ascii"
I don't know in what sense is it good(CMS).
We are using it for the sake of versioning, since there is no
alternative.........for that.
Regards
Venkatesh M S
mob-+91 9980096470
When you decide to stand still in life.
You mark the beginning of your end.
-----Original Message-----
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of Mike
Sokolov
Sent: Wednesday, January 10, 2007 7:05 PM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] RE: General Digest, Vol 31, Issue 8
There is a cms api? Is it documented anywhere? Is it good?
Kelly Stirman wrote:
> What is the error you are getting?
>
> If you are using the cms api, cms:check-in() requires that the
document
> be checked out before it can be checked in.
>
> Kelly
>
>
_______________________________________________
General mailing list
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
------------------------------
Message: 3
Date: Wed, 10 Jan 2007 14:34:48 -0500
From: Patrick Force <patrickf at arc90.com>
Subject: [MarkLogic Dev General] max function alternatives
To: general at developer.marklogic.com
Message-ID: <C69ED268-1BB7-442B-8BC4-D14504E9042B at arc90.com>
Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes;
format=flowed
I'm attempting to find some alternatives in MarkLogic for improving
the speed of a max XQuery call we currently have in place. I believe
the solution exists, for my case, in setting an attribute index, but
I've been unsuccessful in my attempts so far. The help docs for the
administration interface don't seem to explain the meaning and exact
use of the namespace uri values of a range index. I believe I might
be mixing XPath concepts into the namespace values erroneously. A
more detailed explanation of the scenario:
1) We have multiple documents that exist at the uri like: /c/database/
documents
2) Each document contains a root element like: <RootElement
id="HPX_9876" index="9876">...etc.
3) Our current XQuery call in question: max(/RootElement/@index)
4) I've attempted to set up an attribute index via the administration
console:
a) scalar type: string
b) parent namespace uri: ??? I've attempted a uri-type value like /c/
database/documents/RootElement but I haven't found a good explanation
of what this value should be
c) parent localname: RootElement
d) namespace uri: ??? again, not sure how to set this one but have
tried uri-type value of /c/database/documents/RootElement/@index
e) localname: index
5) Set the above attribute index in efforts to make the following
XQuery perform a faster max call:
max(for $i in cts:element-attribute-values(xs:QName
("InsurancePolicy"),xs:QName("id"))
return xs:int($i))
Any ideas/suggestions would be greatly appreciated.
Patrick
------------------------------
_______________________________________________
General mailing list
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general
End of General Digest, Vol 31, Issue 10
***************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20070110/85d22563/attachment.html
More information about the General
mailing list