Jump to content


This topic is now archived and is closed to further replies.


A search engine

Recommended Posts

Alright, as a fun side project I wanted to create a search engine for my gaming website.. where you can put in keywords and it'll search through various games and artlces and give you the results with a relevancy percent.

Now I dont want to use google because that would take the fun out of programming it.

I had the origional idea just to try to match up the keywords in the titles/categories of the games/articles, and if there were no matches subtract a letter from the end of the keyword and try it again, if the full word matches then each time it attempts it adds 1 to a counter, at the end the counter is divided by the number of results that it matched, so if there was 1 result from a 50% of the letters of a keyword you would get a 50% relevance.

But then I started to think, why not have users/writers type in keywords, and use a keyword engine that way? In that sense do something like allow a user to enter a new keyword for the article and in a database have each keyword link to the ID of another article like so:

Keyword ID | Keyword | Article ID
1 | metroid | 3
2 | prime | 3
3 | zelda | 1
4 | princess | 1

and so on, then when they search, search the keyword table for the matching keywords and return a link to the article, do this for each keyword. Now eventually theres going to be a lot of articles/games listed, probably in the millions eventually.

Do you think this way, or the other way is going to be more efficient/fast? Which way do you think would yield the best results and how do you think I should go about making the relevancy part?

Thanks in advance, and please don't say "just use google" that would take the fun out of programming :)

Share this post

Link to post
Share on other sites
Here is a tutorial that may help to answer some of your questions.. [url=http://codewalkers.com/tutorials/46/1.html]http://codewalkers.com/tutorials/46/1.html[/url]


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.