Jump to content


Photo

A search engine


  • Please log in to reply
1 reply to this topic

#1 tleisher

tleisher
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts

Posted 12 October 2006 - 11:42 PM

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 :)

#2 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 13 October 2006 - 12:10 AM

Here is a tutorial that may help to answer some of your questions.. http://codewalkers.c...rials/46/1.html


Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users