AnsweredAssumed Answered

Searching a file in repository

Question asked by itsard on Jul 23, 2009
Latest reply on Oct 16, 2009 by shamabbas
Can u help me with this…
I need to search a document in Alfresco repository.
I pass the file name and need to get the reference to it.
Below is the code am using.
Query query1 =new Query(Constants.QUERY_LANG_LUCENE,"PATH:\"/app:company_home/cm:sample_folder/cm:"+ISO9075.encode(lStringFileName)+"\"");

Whether I use the ISO9075.encode or not it gives random result.Sometimes it finds the doc and sometime doesnt. There is some prob with the documents having "_,digits,spaces" in their names.
Can u let me know the code for searching a document in the repository.
Alfresco version : 3.0 community edition