tleisher Posted October 12, 2006 Share Posted October 12, 2006 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 ID1 | metroid | 32 | prime | 33 | zelda | 14 | princess | 1and 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 :) Quote Link to comment Share on other sites More sharing options...
tomfmason Posted October 13, 2006 Share Posted October 13, 2006 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]Tom Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.