Raghu, Fragment roots are a very advanced configuration and are often not what people want. It changes the search behavior in some ways, for instance.
What do you actually need to accomplish? We can advise on how to model the data, how to query it and whether fragment roots are what you need. Yours, Damon -- Damon Feldman Sr. Principal Consultant, MarkLogic From: [email protected] [mailto:[email protected]] On Behalf Of Raghu Sent: Tuesday, February 12, 2013 7:10 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Somebody please help me! Thanks for the quick response Ryan! I will have to figure out an alternate way then! :) On Tue, Feb 12, 2013 at 7:03 PM, Ryan Dew <[email protected]<mailto:[email protected]>> wrote: You can't have a filtered cts:uris call. You could do cts:search(/root,$myquery)/fn:base-uri(), but that could be expensive precisely because it is filtered. Just out of curiosity, though, I tried setting up the fragment root locally and have confirmed that cts:uris works as expected with the fragment root. I'll let an expert speak to the memory impact, but my experience is that there isn't much of an issue with root fragments. If you already have a lot of data in your DB then it could take some time re-indexing, but that is about all I've observed. -Ryan Dew On Tue, Feb 12, 2013 at 4:52 PM, Raghu <[email protected]<mailto:[email protected]>> wrote: Introducing fragment roots is it gonna take additional memory/indexes? Is there an easier way without having to create any fragments/indexes? On Tue, Feb 12, 2013 at 6:48 PM, Raghu <[email protected]<mailto:[email protected]>> wrote: @Ryan - you are right cts:search is also giving the same results when "unfiltered" Is there an option to make cts:uris/ cts:uri-match behave like a filtered search?? On Tue, Feb 12, 2013 at 6:31 PM, Ryan Dew <[email protected]<mailto:[email protected]>> wrote: I believe this is because cts:uris is always unfiltered. You should get the same result from cts:search result if you passed the 'unfiltered' option. I believe you can get what you want if you set 'detail' as a fragment root. You can read about fragment roots here: http://docs.marklogic.com/guide/admin/fragments#id_34807 I maybe wrong since I've never tested this sort of thing with cts:uris, but someone smarter than me might be able to have a more certain answer. -Ryan Dew On Tue, Feb 12, 2013 at 4:20 PM, Raghu <[email protected]<mailto:[email protected]>> wrote: HI all, I have a parent - detail with two children -name , value I wrote an xquery to fetch the document with both name and value (should be siblings) with 'a' as value cts:search is working a s expected whereas cts:uris isn't Please find below the sample xquery Thanks in advance xdmp:document-insert("/1.xml", <root> <detail> <name>a</name> <value>a</value> </detail> <detail> <name>a</name> <value>b</value> </detail> </root> ), xdmp:document-insert("/2.xml", <root> <detail> <name>a</name> <value>b</value> </detail> <detail> <name>b</name> <value>a</value> </detail> </root> ), xdmp:document-insert("/3.xml", <root> <detail> <name>b</name> <value>b</value> </detail> <detail> <name>b</name> <value>b</value> </detail> </root> ); (: both children of detail 'name' and 'value' should have 'a' as text content :) let $myquery := cts:element-query(xs:QName("detail"), cts:and-query(( cts:element-range-query(xs:QName("name"),"=","a"), cts:element-range-query(xs:QName("value"),"=","a") )) ) return ( "cts:uris/ cts:uri-match results:", cts:uris('',(),$myquery), "cts:search results:", cts:search(/root,$myquery) ) _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
