You may refer following solution to add search functionality to your website?
Google Custome Search
With Google Custom Search, add a search box to your homepage to help people find what they need on your website.
Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform.Apache Lucene is an open source project available for free download. Please use the links on the right to access Lucene.
The Apache Lucy search engine library provides full-text search for dynamic programming languages. It is a “loose C” port of the Apache Lucene™ search engine library for Java.
Tipue Search is a site search engine jQuery plugin. It’s free, open source, responsive and fast.
Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world’s largest internet sites.
Xapian is an Open Source Search Engine Library, released under the GPL v2+. It’s written in C++, with bindings to allow use from Perl, Python, PHP, Java, Tcl, C#, Ruby, Lua, Erlang, Node.js and R (so far!) Xapian is a highly adaptable toolkit which allows developers to easily add advanced indexing and search facilities to their own applications. It supports the Probabilistic Information Retrieval model and also supports a rich set of boolean query operators.
Omega operates on a set of databases. Each database is created and updated separately using either omindex or scriptindex. You can search these databases (or any other Xapian database with suitable contents) via a web front-end provided by omega, a CGI application. A search can also be done over more than one database at once.
Sphider is a lightweight web spider and search engine written in PHP, using MySQL as its back end database. It is a great tool for adding search functionality to your web site or building your custom search engine. Sphider is small, easy to set up and modify, and is used in thousands of websites across the world.
Some Userful reading
Some 3rd Party Solutions
FusionBot offers multiple levels of search, at the free level you get: 250 pages indexed, 1 automatic index per month, 1 manual index per month, basic reporting, sitemap, and more. It even supports searching across SSL domains.
It is simple to sign up for this free service. It has additional features of a site map, and “what’s new” pages that are automatically generated along with your search field. You control how often they spider your site, so you can be sure that new pages are added to the index. It also allows you to add additional sites to the spider to be included in the search.
Add up to three entry points to your search engine on the free plan. You get email tech support, 250 indexed pages, and manual reindexing. It has nice reporting that is easy to use and understand.
Fluid Dynamics Search Engine
This shareware product has the convenient feature of a fully automated wizard online to help you install the search engine. It includes online administration of your search engine, and includes usage statistics for what people have searched on.