I have a view listing nodes. I added 2 exposed filters. One is Content: title and the other is Content:Body. Then I have 2 input fields to enter some keyword to do searchs.

I need to have just one field and do the search in both fields: title and body. Can I do this?

enter image description here


I think you could either:

  • Use the Global: Combine fields filter which allows you to choose two fields (out of those already added to the display as a normal field) to filter on. The filter can be exposed, its operator changed, etc. like normal. Views warns This filter doesn't work for very special field handlers.

  • Use the Search: Search Terms filter. This uses search.module's data to do the query (check out the search index build mode).

| improve this answer | |
  • 1
    thanks. I used the Search: Search Terms filter method and get it working properly. – chefnelone Nov 26 '12 at 17:08
  • Thanks, I needed to combine the First name and Last name from the user object to filter the view. Global: Combine fields did the trick – Sorin May 25 '16 at 9:08

Yes, use the search terms that works.

It search both title and the body and display the result.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.