AnsweredAssumed Answered

Query *all*users with Lucene

Question asked by mpeters on Mar 29, 2011
Latest reply on Mar 29, 2011 by andy
Hello,

I am trying to query all users (i.e. even those users created by a LDAP sync) with a JavaScript implemented Lucene search. I've already done the basic code (showing the relevant parts only):

var foundUsers = search.luceneSearch("user://alfrescoUserStore", "QNAME:\"usr:user\"");

if (foundUsers.length) {
   for(var i = 0; i < foundUsers.length; i++) {
      // do some funny things with each user provided in foundUsers[i]:
      […]
   };
};
The returned array foundUsers has indeed some user entries, but only those six users, which were created manually within Alfresco. But there are some hundred other users, which were created by a regular LDAP sync. Those are not contained in foundUsers.

I've also tried the one parameter version of search.luceneSearch() without specifying a store:

var foundUsers = search.luceneSearch("QNAME:\"usr:user\"");
This led to an empty result array.

Does anybody know the appropriate Lucene query to fetch really all users of Alfresco?

Thanks.

Kind regards,
Markus

Outcomes