AnsweredAssumed Answered

Site search syntax for finding files by wildcard pattern

Question asked by almoehi on Feb 18, 2013
Latest reply on Mar 11, 2013 by almoehi
Hi everybody,

I'd like to use the site search dashlet to find certain files in a doc lib sub folder. The are of type pdf and their names follow a defined scheme with variables. How is the syntax for that? Let's say, for example, I have a folder "Reports" in the doc lib, and in this folder are, amongst others, some files named "WP-<wpnum>-rep-<repnum>-<grpname>.pdf", where <wpnum> and <repnum> can have 1 or more digits and <grpname> is the short name of the group that created this file.


/
  Reports/
    WP-1-rep-1-grp1.pdf
    WP-1-rep-1-grp2.pdf
    WP-1-rep-2-grp1.pdf
    …
    <some unrelated files>
    …


So far, I have found out how to list all files in "Reports": +PATH:"//cm:Reports//*". But even a simple "*.pdf" does not work. Ok, I understand that this is XPath, so I also tried something like *[@cm:name='*pdf'] and variants, but nothing. It's obvious that I don't have experience with XPath, but am I really supposed to for finding some files?
Any help would be appreciated.

I have a general remark on the site search, maybe a developer reads it. Of course it is (or has the potential to be) quite powerful by being so flexible. But it's IMHO too complicated for "normal" users. I have to manage an Alfresco server for a medium project group. None of these people is a programmer and few of them know XPath, Lucene or even regular expressions. All they want is searching the document lib for files, using simple patterns they know from windows explorer. I can hardly convince them of learning a new language to do a simple search. And for me it's not convenient, too. Although I'm willing to dive into the internals of Alfresco, I neither have time to nor is the documentation clear enough. I've spent hours looking around for an example, but the Alfresco manual seems to concentrate on more complicated stuff.
I'd really love to have something like a "simple doc lib search", where I can use primitive wildcard patterns or at least regular expressions.

Best regards,
Alex

Outcomes