4

I have a View with and Exposed Filter: Search: Search Terms to filter the view result based in the keywords entered in this filter.

I works, but not as I expected.

Lets say I have a node with the title "The car, a good transport". Then:

  • if I enter the keyword: car the node is shown
  • if I enter the keywords: car a good the node is not shown
  • if I enter the keywords: good car the node is not shown

Is this behaviour right? I need the node to be shown in all these situations

UPDATE: I see that there is already an open issue about this: http://drupal.org/node/1615438

5
  • do you want that node "The car, a good transport" as result, if you enter anyone of above 3?
    – Sathiya
    Feb 26, 2013 at 5:24
  • yes that is what I need
    – chefnelone
    Feb 26, 2013 at 7:52
  • If you want to search nodes based on title alone, you can try with Node:title instead of Search:search terms in filter section and select the operator as "Contains any word".
    – Sathiya
    Mar 1, 2013 at 6:44
  • good idea, but I also need to search into the body of the node.
    – chefnelone
    Mar 1, 2013 at 10:39
  • @Sathiya Based in your idea I added the node:title and node:body and get it working. Do you mind to move your comment as an answer so that I can accept it?
    – chefnelone
    Mar 4, 2013 at 12:20

3 Answers 3

5

If you want to search nodes based on title alone, you can try with Node:title instead of Search:search terms in filter section and select the operator as "Contains any word"

0

Search API allows the indexing of multiple fields. This would allow you to search both title and body fields.

-1

It's better to use operator "contains all words". Drupal search is no good, it's indexing everything but then you can't find anything..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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