You want a serious answer? Why would a teacher ask you that question? who would know how? You can make a simple search engine, easily.
You should win the under statement of the year award for that comment. In theory, it's hard. You need too develop 3 different things. Robot to Crawl Web Pages Software to Render the Robots Data Software to Pull Rendered Data from Database for Results
You want to create your own search engine? Heres the easy way! Simply sign up for an adsense account, select adsense for search and the option to host the search results on your own website, drop the google search bar code onto a web page, restyle the search bar and results to your website theme and show your teacher. Now you have a brilliant search engine without having to actually make one, your teacher won't know the difference! (Hopefully)
Is this a project? If not just sign up with Google Adsense and integrate it in a website u are supposed to be working on?