The "HTML filter" has to strip tags from query keys and decode html entities as well if it is configured to strip tags from indexed fields.
Otherwise you might miss results. (BTW that's the way we did it in apachesolr, too.)

Comments

mkalkbrenner created an issue. See original summary.

mkalkbrenner’s picture

Issue summary: View changes
mkalkbrenner’s picture

StatusFileSize
new702 bytes

cleaned up the patch

Status: Needs review » Needs work

The last submitted patch, 3: strip_tags_from_search_keys_2.patch, failed testing.

mkalkbrenner’s picture

Status: Needs work » Needs review
drunken monkey’s picture

StatusFileSize
new699 bytes
new586 bytes

Thanks a lot!
However, I think overriding process() would be the proper thing to do here, since that way you'll also catch filter values (in the rare cases of filters on fulltext types).

mkalkbrenner’s picture

As long as "process" doesn't conflict with "processFieldValue" that exists in this class I'm fine. As I understood the API "process" is for everything. If you want to do separate things for index and search you have to use "processFieldValue" and "processKey".

drunken monkey’s picture

Status: Needs review » Fixed

As I understood the API "process" is for everything. If you want to do separate things for index and search you have to use "processFieldValue" and "processKey".

Yes, more or less correct, process() is the default implementation for processFieldValue(), processKey() and processFilterValue(). But when you override processFieldValue(), that's no longer the case, so process() is a good shortcut to override both of the other methods at once.

Since it seems to be fine with you otherwise: committed.
Thanks again for your work!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.