[MarkLogic Dev General] limiting documents to search
Paul M
pjmaip at yahoo.com
Thu Dec 6 13:04:44 PST 2007
This goes back to limiting searches.
I have the following:
Two documents
doc1prod.xml has the following: role/permission => proddocs, read
doc2test.xml has the following role/permission =>testdocs, readfull path of
doc1prod.xml => prod/doc1.xml
doc2test.xml => test/doc2.xml
User: superuser
has roles proddocs and testdocs assigned
Now I do a cts:search(fn:doc() ...
Both documents doc1 and doc2 will be returned.
However, if I construct query similar to the following:
cts:search(fn:doc(),
cts:and-query((query),
cts:directory-query(("/prod/"), "1") ) ) )
I should only get doc1prod.xml. But what is the performance hit in general. i.e. +5% +10% +20% when limiting by directory? Would searching within a collection be -noticeable faster than searching by specifying directory? (I am trying to avoid collection, more permissions and roles would be required.)
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20071207/4f0b1c0d/attachment.html
More information about the General
mailing list