Hi Tim, You can only search one path and it has to be "searchable". A searchable path is a subset of XPath, and you can tell if it is searchable by trying it in a cts:search and seeing if it throws an exception. If it does not throw an exception, it is searchable.
In general, you can use unions, so I think this form will work: cts:search(/(foo | bar)//bar, "hello") -Danny From: [email protected] [mailto:[email protected]] On Behalf Of Tim Meagher Sent: Friday, August 12, 2011 9:22 AM To: 'General MarkLogic Developer Discussion' Subject: [MarkLogic Dev General] What is the syntax for supplying multiple expressiosn in cts:search? I'd like to search multiple paths for a given query when using cts:search. Given one path it works fine, i.e. cts:search(/ns1:el1, $query) But what if I want to query in multiple paths, e.g. cts:search((/ns1:el1, //ns2:el1), $query) This doesn't seem to work... Tim
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
