views:

133

answers:

1

Hi,

for my current project I need to implement a search functionality, that combines both the content search and the user search.

This raises several issues, for example relevance. Nodes have a relevance when searched, and users do not.

Now, I was thinking how to tackle this the best way. To my knowledge, I have several options :

  • hook search, and use the do_search function twice, once for nodes, once for users, and combine both results. However, this messes up the paging I presume. This seems my best bet.

  • hook search, and use the do_search's capability to combine both a node and a user search. do_search can combine 2 queries, but I'm not sure how this exactly works.

  • hook search, and write to whole stuff by hand, but that I would rather not do.

Any suggestions ? Is there someone who has done this before ?

Many thanks!

+1  A: 

content_profile exposes user data in a node so you would just need one search

Jeremy French
Yes we do the same thing for one of our sites.
GloryFish