Hi Martín,
There is currently no way to filter resources by their prefix. As has already been motivated, the best solution for now is indeed to use the path semantics (i.e., distribute your resources to sub-directories) and call db:open($db, $path).
Hope this helps, Christian
On Fri, Aug 28, 2015 at 6:35 PM, Martín Ferrari ferrari_martin@hotmail.com wrote:
Hello: I wonder if there's a fast way to get the contents or names of the resources that start with a certain path. We have something like this:
string query = @"for $doc in collection() where substring-after(document-uri($doc), '/')
= '" + documentName + @"' return $doc/Root";
But our db has millions of resources so this doesn't scale too well. I'd like a way to get the contents (or names) of resources in which the
names start with a certain pattern without having to check all names. Is it possible?
The alternative would be to add a field inside the xml resources, index
on it, and perform a query.
Thanks, Martín.