Have you ever tried to use a your WordPress site's search bar and found the results to be jumbled and improperly organized? This is because the stock WordPress search functionality is fatally flawed. It will search your keyword throughout all of your posts and pages and display matched elements in the order in which they were posted. It does not take into consideration sorting the results by relevance, which means it will equally flag any post that mentions the keyword whether it be in the header, mentioned in multiple places, or just randomly mentioned once in the content.
There are many plugins out there that are supposed to fix this problem, but most of them are complicated to setup and require messing with the database in order to achieve the correct results. The best solution I've found for fixing the WordPress search quickly and easily is by installing a free plugin found within the WordPress repository called ‘gSearch Plus‘. What this plugin does is improve the integrated WordPress search functionality without adding new databases or complex configurations. Instead, it uses the default WordPress API and improves it to provide revelvant and accurate search result rankings. The output is simple and clean without slowing your site down.
gSearch Plus will searches through all posts, pages, and custom post types while analyzing both the title and content of each. It also extends the search to custom taxonomies, categories, tags, and custom fields. It has a built-in algorithm that will sort results by relevance meaning it will weight a particular keyword in the post title to display at a higher ranking than a post that just features the same keyword a single time in the content's body. You also have the ability to enable/disable the highlighted search term option which will highlight your keywords in each search result much like Google does.
We are using this plugin currently and have found the improvement to be extremely satisfying and unbelievably easy to implement.I highly recommend trying out this free plugin for anyone who is having issues with the quality of their WordPress site's built-in search functionality!
Photo Credit: Peregrino Will Reign