To keep it simple and to avoid such additional indexing, I’m going to employ the cts:search to obtain the appropriate unique ID from which I can construct the URI. I could also create a range path index.
Thanks! Tim From: [email protected] [mailto:[email protected]] On Behalf Of Evan Lenz Sent: Thursday, September 08, 2016 2:20 PM To: MarkLogic Developer Discussion <[email protected]> Subject: Re: [MarkLogic Dev General] Embedded element queries work in cts:search but not in cts:uris? Hi Tim, In my experience, "word positions" isn't necessary, but you will need both "element word positions" and "element value positions". That also jibes with this KnowledgeBase article: https://help.marklogic.com/knowledgebase/article/View/245/0/queries-constrained-to-elements But be advised that the following sentence is worth paying attention to, particularly at large scales: "However, if you have a lot of relationship instances in a document, the calculations using positions can become quite expensive to compute." That's something I'm wrestling with now. Just because something can be determined from the indexes alone doesn't mean it will always be fast. It may not be a problem in your case though. Hope this helps, Evan Evan Lenz President, Lenz Consulting Group, Inc. <http://lenzconsulting.com> http://lenzconsulting.com On Thu, Sep 8, 2016 at 11:00 AM, Tim Meagher <[email protected] <mailto:[email protected]> > wrote: Thanks for the response and so quickly at that! Tim From: [email protected] <mailto:[email protected]> [mailto:[email protected] <mailto:[email protected]> ] On Behalf Of Rob Szkutak Sent: Thursday, September 08, 2016 1:46 PM To: MarkLogic Developer Discussion <[email protected] <mailto:[email protected]> > Subject: Re: [MarkLogic Dev General] Embedded element queries work in cts:search but not in cts:uris? Hi Tim, By default, cts:search() runs filtered queries and cts:uris() only runs unfiltered queries. Think of unfiltered queries as queries that are resolved based on index information alone. In other words, there isn't enough information in your indexes for cts:uris() to resolve accurately. If you chose to run cts:search() unfiltered, I expect you would see the same thing. If you enable the "word position" and "element word position" indexes on your database, then I expect you would see the correct results from cts:uris() after the database finishes creating those indexes. Best, Rob Rob Szkutak Senior Consultant MarkLogic Corporation [email protected] <mailto:[email protected]> Cell +1.716.562.8464 <tel:%2B1.716.562.8464> www.marklogic.com <http://www.marklogic.com> _____ From: [email protected] <mailto:[email protected]> [[email protected] <mailto:[email protected]> ] on behalf of Tim Meagher [[email protected] <mailto:[email protected]> ] Sent: Thursday, September 08, 2016 12:28 PM To: 'MarkLogic Developer Discussion' Subject: [MarkLogic Dev General] Embedded element queries work in cts:search but not in cts:uris? Hi Folks, I have been able to successfully use embedded cts;element-value-query() calls within cts:element-query() under cts:search to emulate an xpath query, but using the same embedded call within cts:uris does not limit the results the context of the cts:element-query(). I’m using ML7.0-5. Is this a bug or a feature? Tim Meagher – Just some person trying to make a living… _______________________________________________ General mailing list [email protected] <mailto:[email protected]> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
