AnsweredAssumed Answered

Fastest way to retrieve all content for a user?

Question asked by albertomv on Nov 23, 2007
Latest reply on Dec 3, 2007 by andy

I'm trying to develop a WebScript to retrieve all content from the repository (from app:company_home//*) where an user has access (i.e. Consumer permission) and doing it the fastest way possible.

I've tried several approachs, the fastest being:

Set<NodeRef> nodes = permissionService
                  PermissionService.CONSUMER, true, true, true);

and then walking the tree recursively from these nodes checking permission access without repeating searchs (i.e. one of the nodes in the set containing another as descendant).

This approach is slightly faster than walking the whole app:company_home tree.

The problem is that its performance depends mostly in the "inherit permissions" property of a node and in the state of the permission cache.

I also tried with Lucene, but Lucene Search doesn't seem to support user-permission metadata, does it?

Any ideas or suggestions would highly appreciated!