Jump to content

A search engine


tleisher

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 :)
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.