Programming. But I don't think it's useful. If you really want your own search engine, for your website, use Google Custom Search engine script/code.
It's a huge project if you would like to program a successful search engine. My suggestion is to make good of use the popular ones.
Hah, your not going to get an answer just like that, do some research, its going to take time and money