: Jokes search engine / PHP based search engine on database I'm looking for a script, functioning like the Google homepage that fetches data from a database rather than the internet. This is
I'm looking for a script, functioning like the Google homepage that fetches data from a database rather than the internet.
This is not intended to be a search engine, but a repository of jokes that can be pulled depending on the keywords typed. No sophisticated search techniques are required - keyword based is perfectly fine.
If some mechanism of up/down-voting jokes can be incorporated, that would be fantastic, but I'm presuming that will be an entirely different game.
More posts by @Phylliss660
5 Comments
Sorted by latest first Latest Oldest Best
You could use www.question2answer.org/ , it's a Q&A but by your description it fits perfectly, you would just have to make a theme (which is fairly simple and the system have some ready to use) and comment out the features you don't want (registration, comments)...
You could use WordPress, categorize and tag the jokes, it has a built in search feature. All the plugins you could want for voting up and down posts, liking them etc, integrate with facebook and twitter etc. You would save a lot of time programming if you worked with a CMS that can already do everything you want and more. You can easily modify the index or home template to look however you want, and the output results again can be customized with CSS.
Have you checked out Sphinx or Solr? Both are relatively easy to use, very flexible and work with php. Here's the link to search engine extensions for PHP it has several options if I were you I'd pick one and test it out.
www.php.net/manual/en/refs.search.php
I don't know of any components already out there. If you were to do this yourself, there are a couple of different methods. The first is a simple fulltext search on your database. This answer on Stack Overflow explains. With fulltext indexes on your fields this wouldn't be particularly inefficient, at least with smaller databases.
A better way would be to index every word from every joke (excluding common words like 'the'). You'd need a table of words with id|word and a mapping table of wordid|jokeid. Whenever you added a joke, get all the individual words and store the mapping. Then when searching, find all jokes containing each word of the search term and combine and rank results how you wish.
There is also the option of using a CMS like Joomla/Wordpress. They come with search modules to search your site pretty easily.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.