I have to admit I saw your message yesterday and didn't respond with the Views idea because I presumed you'd already considered it and dismissed it. Sorry! :-)
You could always expose the fields and have results returned "If Contains: Enter Keyword Here". Nothing will get returned AND you'll have a nice user friendly instruction already entered in the text box.
Neil
----- Original Message ----- From: "Fred Jones" fredthejonester@gmail.com To: support@drupal.org Sent: Monday, June 02, 2008 1:59 PM Subject: Re: [support] CCK Field Search
Try looking into views_fastsearch.module. It lets you leverage the search module's database for Views' exposed filters, creating a reasonably good facsimile of a per-field search.
I presume you mean to look into modifying the code, because AFAICT this module only provides a general search on all fields within the CCK nodes, but it can't be defined to search only only on one field.
On the other hand, in examining this, I have realized that I can create a view and expose a filter for each CCK field in question. This allows users to effectively search on those fields. The only issue now is to style the search fields and also, to set it up so that when the view first loads, no nodes appear (as opposed to ALL nodes appearing because no search terms were setup). For that I think I could hack the Views code.
Seems like this could be the easiest way actually. :)
Unless someone has a better idea.
Thanks, Fred -- [ Drupal support list | http://lists.drupal.org/ ]