I stored documents in Marklogic like below,
Collection : system, user
Documents Stored
1. /system/user/1
2. /system/user/2
Collection : system, role
Documents Stored
1. /system/role/1
2. /system/role/2
Collection : system, access
Documents Stored
1. /system/access/1
2. /system/access/2
Now my requirement is i want all the documents which are only the part of system, access collection so i tried,
for $doc in cts:search(collection(("system", "access")), ())
return
(
document-uri($doc)
)
after executing above code here i am expecting /system/access/1, /system/access/2 because these two documents are only part of "system", "access" collection but here i am getting all the documents from Collection : system, user, Collection : system, role. I am not able to understand wrong with about Code or i am missing something.
Please help me to Fix this Issue.