I've just installed and configured WebFM 6.x-2.12 on Drupal 6.19. Everything is working fine (uploading files, viewing/downloading/attaching files, etc.)
However, search is only returning results when entering a single word search term. Not sure if this is as designed, but it's pretty much useless. For example:
In the folder "test", I have a PDF file named "test-file-1.pdf" with a meta name of "Test File Number One". When I right-click on the test folder and select "Search Directory", the file is returned if I search for "test" or "file" but not "test file" or "test file number one" or even "test-file-1.pdf".
Is this normal? Is there a way to fix this? The ability to search by only a single term is pretty much useless and would stop us from using WebFM for our site.
Comments
Comment #1
cgmonroe commentedLooked thru the search code and found that the search is currently done against only the file name using egrep. So, you could probably find test-file-1.pdf by doing test.*file. But this is only for file names and not meta data.
That said, it did look like it was possible to rework the searchFilesRecur function to check the pattern for multiple words and do an "and" search. Patches always welcome.
Another alternative might be to use the view integration. You probably could create a view block that would do what you want.