I've created a View with an exposed filter Search: Search Terms. If I enter multiple terms in the exposed filter field, the search returns normal results. If I enter multiple terms AND there is a SORT enabled (Random), the search returns no results.

This issue is similar to #362830: Search filter breaks for multiple word searches when view has a sort for a previous version of Views.

Thanks for any help!

Comments

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

You could make us a favor by describing what you really did, see http://drupal.org/node/571990

zdean’s picture

I'm not sure what you're asking. I've outlined the steps to produce the problem:

1. create View
2. expose filter Search: Search Terms
3. set Sort Criteria to Random
4. search for content using multiple terms
5. No results displayed

Alternatively:

1. turn off Sort
2. repeat search with multiple terms
3. search works fine.

What else do you need me to describe?

esmerel’s picture

Status: Postponed (maintainer needs more info) » Active
jacobmn’s picture

Status: Active » Needs review

I'll just throw in for others searching this that I also had the same issue. As soon as I added a Global: Random sort I would no longer be able to search on multiple terms using the Search Terms filter. Took a while to find, but this patch that user gapple put out for one of the D7 versions works for the 6.x-3.x version:

https://drupal.org/node/1986490

I edited views/handlers/views_handler_sort_random.inc and swapped out line 21 with the code provided in the aforementioned post. Fixed the problem beautifully.

Would be great if the next dev version had this patch included - I'm sure others have run into the same issue.

jacobmn’s picture

Issue summary: View changes

replaced "returns no terms" with 'returns no results'

Chris Matthews’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

The Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue