SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2011
    Location
    Portland
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Drupal 7 Extending the default drupal search module

    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?
    coming soon sitejuju.com my new development portfolio

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,030
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    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.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •