I am building a new website and want to add search to the site. I know google offers free and paid solutions but I would prefer to develop something myself if possible. How difficult and what steps would I need to take to put something together?
If you are in the preliminary stages of building your site, why not build it on a CMS foundation like Drupal at www.drupal.org? You probably have something like Fantastico in your Cpanel (depending on your host) and can install Drupal or another CMS with a few clicks. The benefit of using a CMS to manage your content is that the search feature is built in - once you have your site up, just add content, submit, and you're done - content will automatically be searchable with the built-in search feature. HTH!
Thanks for the suggestion about the CMS. Unfortunately, most of the site is already coded and I would rather build it from the ground up for complete customization and to have the knowledge and experience. Any additional assistance would be greatly appreciated.
If you do not want to make a cms and you do not want to use googles custom search, you are somewhat limited. A basic search hack would be something like this: have your search form on a page, link it to results.php post your search term for each page on your site, make an array of terms search each array for a match on the search term list each page whose array matches the search term. A big hack but it will work if no cms and no google search is happening.