I'v never done any serious search in PHP more than WHERE something LIKE %something% but wanted to try a own idea so I would be able to search for word in my content.
My algorim works like this: User submits a title + body. When posted I create split all words and add them to a database table. All words get an index. If a word already exists I don't add it, only retrives the Id of it. After that I add my content Id and the word Id to a table. When a user search for "something" it first searches through the word table and finds the word Id then it looks into the next table and selectes the content where word id = word it. An example; a post sends title => "Welcome" body => "Welcome to this place". Is this a good way to do it? It's pretty many queries but it should be fast than a large file? I don't see any solution with indexes without a lot of data... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
