Rather than hook_form_alter, you should look at hook_search_preprocess.

Comments

z.stolar’s picture

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.

douggreen’s picture

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!

yang_yi_cn’s picture

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.

douggreen’s picture

Status: Active » Closed (cannot reproduce)

I'm doing some ticket triage and closing all open 5.x or moving them to the latest appropriate version. The issue summary rewrite here, has lost the initial question, so I'm not even sure what the problem was. Closing.