AnsweredAssumed Answered

Searching with wild card (*)

Question asked by camillo on Mar 26, 2009
Latest reply on Apr 7, 2009 by camillo
Hi all,

I'm developing a web client for Alfresco. A feature of this web-client is that allows a search in some xml files, all named descriptor.xml, stored in various spaces in order to retrieve some informations.
So, for example, if my xml file is :


I would like looking for all documents which type is "pdf" and which name begins with "my_"
I perform this job using the query:

String query = "PATH:\"/app:company_home//*\" ";
query +=" AND @cm\\:name: descriptor.xml ";
query +=" AND TEXT:\"<DOCUMENT-TYPE>pdf</DOCUMENT-TYPE>" +"\" ";
query +=" AND TEXT:\"<NAME>my_*</NAME>\"";

but i have no results!!!
So, how can i use wild card * to perform my job?
If I replace

query +=" AND TEXT:\"<NAME>my_*</NAME>\"";

query +=" AND TEXT:\"<NAME>*\"";
i find all references to pdf files

Thanks in advance!