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: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Evan Lenz
Sent: Thursday, September 08, 2016 2:20 PM
To: MarkLogic Developer Discussion <general@developer.marklogic.com>
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 <t...@aaom.net 
<mailto:t...@aaom.net> > wrote:

Thanks for the response and so quickly at that!

Tim

From: general-boun...@developer.marklogic.com 
<mailto:general-boun...@developer.marklogic.com>  
[mailto:general-boun...@developer.marklogic.com 
<mailto:general-boun...@developer.marklogic.com> ] On Behalf Of Rob Szkutak
Sent: Thursday, September 08, 2016 1:46 PM
To: MarkLogic Developer Discussion <general@developer.marklogic.com 
<mailto:general@developer.marklogic.com> >
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

rob.szku...@marklogic.com <mailto:rob.szku...@marklogic.com> 

Cell +1.716.562.8464 <tel:%2B1.716.562.8464> 

www.marklogic.com <http://www.marklogic.com> 

 


  _____  


From: general-boun...@developer.marklogic.com 
<mailto:general-boun...@developer.marklogic.com>  
[general-boun...@developer.marklogic.com 
<mailto:general-boun...@developer.marklogic.com> ] on behalf of Tim Meagher 
[t...@aaom.net <mailto:t...@aaom.net> ]
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
General@developer.marklogic.com <mailto:General@developer.marklogic.com> 
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general

 

_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to