Look at hook_search_preprocess
douggreen - June 12, 2008 - 13:21
| Project: | Top Searches |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Rather than hook_form_alter, you should look at hook_search_preprocess.

#1
I did.
In fact, the first tests were done with that hook, but it returns each word at a time, and as I understand, this hook is meant for separate words, not joining them together...
Do you suggest I'd gather them together with, for example, a static variable?
I agree that the use of hooks is generally a better idea, but I don't see the advantage in this particular case.
#2
I didn't spend any time looking at it. But I had hoped that this hook would solve it for you. What I do recommend is that you help us out by proposing either a new hook or a slight tweak in an existing hook for Drupal 7.x. Thanks!
#3
the problem of hook_search_preprocess() is it's called both when updating index and actually search, so this hook is not really designed for this purpose.