drupaldrupal-7drupal-viewsdrupal-search

Drupal 7: Search View with multiple search terms


I've recently set up a custom view that uses Search Terms as a contextual filter and sorts based on search score. The problem I'm having is if the user provides multiple terms it doesn't always return proper, or any results. If I put in one term or the other it works. If I wrap the terms in quotes (e.g. "term1 term2") it works provided that those two actually appear as a phrase somewhere. However if I just put in both words it seems to focus mostly on the first term, but even then the results are different than if I had just put in the first term only (for example it actually won't return any of the results that have the two words as a phrase). Has anyone seen this weird behavior with Drupal search, and if so how do you fix it?


Solution

  • After a lot of digging I found that a lot of people had success with patch #30 on this page, and it worked for me as well: https://www.drupal.org/node/1615438