views:

22

answers:

2

I have a drupal site (d6) where the client would like to be able to search for content from a given user - at the moment a search for "Fred" will turn up any nodes that mention Fred, but none that are by him.

There don't seem to be a lot of options on the search config screen, and while I am fairly experienced with writing drupal modules, I don't have a very solid grasp of the search hooks and whatnot.

Is there a simple way to include these results in the search?

+1  A: 

To do something like that, you could just use views and exposed filters. Then they can search either by keyword or author.

googletorp
I have done something similar for a previous project, but I am not sure I can swap in a whole new search mechanism at this late stage. Hrm.
Andrew
+1  A: 

Using views and exposing the author field seems like the easiest way to do this.

The default search is very clunky and rigid. Alternatively, you could implement your own hook_search(), but it's essentially coding a special case of views, without all the flexibility that views brings.

James