Lucine search & how to get noderef’s

Snippet piece of code. Lucene search for something & then get the noderefs.

var docs = search.luceneSearch(” @cm\\:name:\””+args.filename+”\””);
var log = “”;
for (var i=0; i<docs.length; i++) {
log += “NodeRef: ” + docs[i].nodeRef + “\r\n”;
logFile.content = log;


Using Lucene search to find all user nodes in Alfresco.

Login to alfresco. Goto Administration console / Nodebrowser.
Select Lucene in the dropdown box @ search

Enter this query :


Results in all directories in the user_homes. As far as I know this should be equal to the users in the system. Note that this does not include the alfresco admin user. This has Company Home as ‘user-home’

The above code skipped users guest and admin. I decided to use this query:


This also gives admin and guest accounts and seems more natural to use.