AnsweredAssumed Answered

Search users with lucene

Question asked by chicco0386 on Mar 23, 2011
Latest reply on Apr 18, 2011 by chicco0386
Hi all,
I must to search the user by first and last name and after assign to him a workflow, so assign to bpm:assignee variable the node that return me the lucene search, this lifecycle is correct?

I've this piece of code:
function getUsername(firstName, lastName) {
   logger.log("getUsername, entrato");
   var users = search.luceneSearch("+@cm\\:firstName:\"" + firstName + "\" +@cm\\:lastName:\"" + lastName + "\"");
   for ( var i = 0; i < users.length; i++) {
      logger.log("getUsername, utente "+i+" = "+users.userName);
   logger.log("getUsername, uscito");
getUsername("firstName", "lastName");
It returns nothing, but if I change the query with "TEXT:alfresco" it returns some result.

Can you help me please?
Thank you