cancel
Showing results for 
Search instead for 
Did you mean: 

SearchService query string

redbull
Champ in-the-making
Champ in-the-making
Hi,
this is my actual query:

String queryStr = "@cm\:userName:phil*"
ResultSet resultSet = Repository.getServiceRegistry(context).getSearchService().query(Repository.getStoreRef(),
                       SearchService.LANGUAGE_LUCENE,
                       query.toString());           
and it works well. It return all Alfresco users whose username begins with "phil" string.
Now I would modify the query string to add a further filter for a specific groupname.
Something like: 
AND groupname = writer
where "writer" is my groupname.
Is it possible?  How should I change the string?

Any hint would be appreciated…
2 REPLIES 2

billerby
Champ on-the-rise
Champ on-the-rise
I don't think your approach is possible since the permissions is handled in another way. I would query the authorityService.findAuthoritys to find the group and then filter out the users of this group according to your requirements.

/erik

andy
Champ on-the-rise
Champ on-the-rise
Hi

It looks to me like you are trying to do a JOIN which is not supported.

It is not clear what you are trying to do ….. please describe it in words and forget about the query for now ….

Andy