I’d like implement a new search function into the CMS airpapr. Airpapr uses PDO to connect to the DB. Should I write the search function myself from the ground up, or are there some good open source search engines that can be used in a PHP/PDO DB setup? If it’s recomendable to write the search function myself, are there some good tutorials out there on how to write a search engine with PHP/PDO? The search function itself just has to search two different table rows.
Share
Search is more than a function; it is more complex than simple string comparison + substring occurrence counting.
Taking into consideration matched term highlighting, stemming, synonym matching, the affect of stop words and the need for a search index separate to your content database, search is a broad problem best tackled by an existing search system.
A popular option is Apache Solr:
There is a Solr library for PHP to get you started, not to mention a whole web full of Solr-related resources.