cancel
Showing results for 
Search instead for 
Did you mean: 

Search All Groups

emmy
Champ in-the-making
Champ in-the-making
Hi,
I want search all groups in a web script.
This lucene search

TYPE:"{http://www.alfresco.org/model/user/1.0}authorityContainer"
return all results.

I have used AVM API

<#assign store = avm.lookupStore("alfrescoUserStore")>
<#assign groups = store.luceneSearch("TYPE:\"{http://www.alfresco.org/model/user/1.0}authorityContainer\"")>
but I have this error
avm.lookupStore("alfrescoUserStore") is undefined. It cannot be assigned to store

If I call

<#assign stores = avm.stores>
stores is empty.

How can I do this search?

Thanks in advance,
Emanuela
1 REPLY 1

kevinr
Star Contributor
Star Contributor
You cannot use the AVM API to do this - AVM stores use a different repository engine under the covers. Groups are not stores as "nodes" like the majority of Alfresco objects - the exist in a special table and are managed via the AuthorityService. The only currently available API is here:
http://wiki.alfresco.com/wiki/JavaScript_API#People_API

If you need more functionality you will need to raise an enhancement request in JIRA.

Thanks,

Kevin