chantown Posted December 10, 2007 Share Posted December 10, 2007 Is anyone familiar with this technique? If so, is this how I apply it to a forum with "search" capabilities? If someone posts an article, I scan every word, and I generate a "number" (hash) for each word...a number between 1-1024. I insert each topic/number into a table. (many rows) Then, when a person types a query to search, I hash each keyword into a "number", and use "full-text search" on the topics that have keywords that have that number. does anyone know what I mean? So, i guess the ultimate question is: How do I convert a word into a number between 1-1024? Do you add up the askii of the numbers and mod something? Is there a function in PHP? Quote Link to comment Share on other sites More sharing options...
farkewie Posted December 10, 2007 Share Posted December 10, 2007 i may be way off but you can use md5 it will convert anything in to a 32 digit hash <?php $word = md5($keyword); ?> Quote Link to comment Share on other sites More sharing options...
chantown Posted December 10, 2007 Author Share Posted December 10, 2007 Is there any way to convert it into a 4 digit? Quote Link to comment Share on other sites More sharing options...
teng84 Posted December 10, 2007 Share Posted December 10, 2007 nope unless you make your own but thats pretty hard 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.