Paul,

I believe you can range-index the uniqueId, element or attribute, then call 
cts:element-values() with the option to return data as a map. You can put your 
other sequence into a map also and "subtract" maps via the "-" operator to get 
a fast set difference.

Yours,
Damon
--
Damon Feldman
Sr. Principal Consultant, MarkLogic

From: [email protected] 
[mailto:[email protected]] On Behalf Of Paul M
Sent: Friday, February 08, 2013 9:19 AM
To: [email protected]
Subject: [MarkLogic Dev General] finding an id that does not exist

4 documents: docA, docB, docC, docD. Each have a unique id field with values:  
111, 222, 333, 555 respectively. I have a sequence 111,222,333,444. 444 does 
not exist in the document set docA, docB, docC, docD. Is there a faster way of 
finding this information. I have looked at a few cts functions but I keep 
coming back to recurse through each sequence 111,222,333,444 and do 
xdmp:estimate cts:search cts:element-value-query on each value. Fast, but still 
takes time. Maybe co-occurrence, if data has multiple id fields? 
111-aaa,222-bbb,333-ccc,555-eee

thanks

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

Reply via email to