Rajuru:
There are a few main flavours for search engines, but here are 2 good ones:
Reverse Indexing
Vector Space Searching
Here's a tutorial for vector space search engines:
http://www.perl.com/pub/a/2003/02/19/engine.html
That's a total godsend, even if you don't know perl. Make sure you read it two or three times. At the end of that tutorial, they also have a few links to other good tutorials, where you can learn about reverse indexing.
The main concept of reverse indexing is that you have an index (like you might have at the back of a book), which tells in which pages words appear. Works a treat, and is really simple to learn.
Good luck!
--
Please contact me at:
Colin (dot) Horne (at) gmail (dot) com