jgetner — 2012-02-27T23:52:57-05:00 — #1
I have a client that is requesting me to extend the drupal search module to include searching for multiple keywords an example would be "FOO BAR" i need to split these into multiple keywords so the new search would contain the following keywords "FOO BAR" , "FOO" , "BAR" is this possible? and if so what hook or do i need to re-write the search module?
awasson — 2012-02-28T12:46:55-05:00 — #2
Out of the box Drupal's search feature takes multiple terms. I think the default behaviour is to search using AND so if you search "foo bar" Drupal will return links to content with foo AND bar.
If you want to change this behaviour to an OR relationship, you can likely do so by building your own search app using views. You can add an exposed filter and choose "contains any word" or "contains all words" from the filter options.