I need to write a basic module which will allow me to include/exclude certain nodes with specific field values when a user is using the search module. I have figured out everything I need to do except on how to alter the where clause for the search query. Where and how can I do this? I have been searching for examples on hook_search, do_search but the most I can find is the API docs which dont help much in terms of examples. I dont even know if that is the correct way to do it.
The reason I need to do this is because we have content types with a with a checkbox which specifies whether the node is a default node or not (we use this to identify promotional content on our site) and the titles have product codes which are giberish to the users. They are not accessible through our menu system but show up when searching for content in the search results list. I need to exclude them from the search results. My idea is to write a module which will allow me to specify node fields with values and specify whether to include them or exclude them in the search results (hence ammend the where clause).
I am a newbie in developing modules and have only started to delve into it a week ago. If anybody can point me to decent documentation on hooks with easy to follow examples and explanations that would also be a bonus. Thanks.
Any guidance or help will be greatly appreciated.
Rosso