[MarkLogic Dev General] limiting documents to search

Michael Blakeley michael.blakeley at marklogic.com
Thu Dec 6 13:21:29 PST 2007


Paul,

Directories and collections are both indexed in much the same way, and 
perform similarly.

-- Mike

Paul M wrote:
> 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 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4532 bytes
Desc: S/MIME Cryptographic Signature
Url : http://xqzone.marklogic.com/pipermail/general/attachments/20071206/87d90855/smime.bin


More information about the General mailing list