Jakob,
This query will figure out which documents are in/out of your desired result
using the indexes:
let $q := cts:and-not-query(cts:collection-query("c1"),
cts:collection-query("c2"))
you can then list the URIs only if you have a URI lexicon
return cts:uris("", (), $q)
or retrieve all the actual documents (if that is tractable for your data):
return cts:search(doc(), $q)
Yours,
Damon
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jakob Fix
Sent: Monday, May 09, 2011 8:04 AM
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] op:except?
Hi,
I have two collections c1 and c2 of documents where c2 is a subset of
c1, and I would like to get a sequence of all documents in c1 that are
not in c2. I was hoping to use the except [1] operator for this, but
MarkLogic does not seem to know it.
Well, I just read [2] and there it says: " there is no requirement
that implementations should actually provide these functions" [3]. If
that is indeed the case, could you please tell me how I can get an
equivalent functionality? By the way, I tried c1 - c2, and it doesn't
work.
thanks,
Jakob.
[1] http://www.w3.org/TR/xpath-functions/#func-except
[2] http://www.w3.org/TR/xpath-functions
[3] http://www.w3.org/TR/xpath-functions/#namespace-prefixes
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general