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: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Wed 1/10/2007 3:00 PM
To: [email protected]
Subject: General Digest, Vol 31, Issue 10



Send General mailing list submissions to
        [email protected]

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
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

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 ([EMAIL PROTECTED])
   3. max function alternatives (Patrick Force)


----------------------------------------------------------------------

Message: 1
Date: Wed, 10 Jan 2007 08:35:26 -0500
From: Mike Sokolov <[EMAIL PROTECTED]>
Subject: Re: [MarkLogic Dev General] RE: General Digest, Vol 31, Issue
        8
To: General Mark Logic Developer Discussion
        <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
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: <[EMAIL PROTECTED]>
Subject: [MarkLogic Dev General] CMS apis
To: <[email protected]>
Message-ID:
        <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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
[email protected]
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 <[EMAIL PROTECTED]>
Subject: [MarkLogic Dev General] max function alternatives
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
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
[email protected]
http://xqzone.com/mailman/listinfo/general


End of General Digest, Vol 31, Issue 10
***************************************


_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to