Hi, when I search for files and I use the filenames, and not words which are in the text of the files, i dont get results.

If I used words which are in the text of the files, it works fine.

What can I do?

Comments

thl’s picture

Assigned: Unassigned » thl
Status: Active » Postponed

Tried it with Beta3 and it works.
Source code reveals the filename is injected as an artificial "content".
But both modules do it differently, which should be aligned.

thl’s picture

Priority: Normal » Minor
mdallmeyer’s picture

Version: 6.x-6.x-dev » 6.x-2.x-dev
Priority: Minor » Normal

I have a rather specific issue - when files are password protected, only the file name is indexed. This would be alright if file names could have spaces in them, but they can't. Drupal replaces spaces with underscores, and then search files removes all non-alphanumeric characters, running the rest of the string together.

In essence, a file named "Labor Rate Tables.xls" becomes "Labor_Rate_Tables.xls" when uploaded to Drupal, and this is then reduced to "LaborRateTablesxls" when indexed, which is not going to help anyone when they search for "labor rate".

If someone could point out the section of code which removes these non-alphanumeric characters that would be great - my plan is to insert spaces instead of just removing the character. That way, the strings "Labor" "Rate" "Table" and "xls" would be included separately, making for a much better search.

mdallmeyer’s picture

Status: Postponed » Needs work