cancel
Showing results for 
Search instead for 
Did you mean: 

freemarker lucenesearch problem

xerox
Champ in-the-making
Champ in-the-making
I want to get the group test.

so i've tried the lucenesearch with following string
TYPE:usr\:authorityContainer AND @\usr\:authorityName:GROUP_test
in the nodebrowser and it works

But when I try to use the search in my freemarker template, it always gives an error

<#list companyhome.childrenByLuceneSearch[" TYPE:usr\\:authorityContainer AND @\\usr\\:authorityName:GROUP_test "] as child>
</#list>
It seems the list is empty..
I think it's because he searches in spacesstore instead of userstore.
Can anyone help me?

friendly regards
Nick
4 REPLIES 4

xerox
Champ in-the-making
Champ in-the-making
Or is ist not possible to reach that store with the freemarkertemplate?

I know it's possible with javascript,but i'm not sure about freemarker…

kevinr
Star Contributor
Star Contributor
It is currently not possible to search stores other than SpaceStores in script/templates.

Thanks,

Kevin

xerox
Champ in-the-making
Champ in-the-making
People API
Note: This API is only available in Alfresco 1.4 Enterprise (for now).

The People API provides access to Alfresco people and groups. The API provides the following functions:

Node getPerson(string username)
Returns a single (cmSmiley Tongueerson) Node associated with the specified username, or null if the person does not exist.
Note: This part of the API is from Alfresco 2.0.

Node getGroup(string groupname)
Returns a single (usr:authorityContainer) Node associated with the specified group name, or null if the group does not exist.
Node[] getMembers(Node group)
Returns a collection of people belonging to the specified group (including all sub-groups).
Node[] getMembers(Node group, boolean recurse)
Returns a collection of people belonging to the specified group. People of sub-groups are only returned if recurse is specified as true.


http://wiki.alfresco.com/wiki/JavaScript_API

I found this in the wiki? so I think it should be posssbile with javascript?

friendly regards
Nick

kevinr
Star Contributor
Star Contributor
Yes there is a specific API for this in JavaScript (which has been expanded in 2.1 to allow groups creation and modification) but what I mean is that there is no generic lucene search in javascript/freemarker that will search the user store.

Thanks,

Kevin