New Search Overrides Module
You can make the most elegant, relevance-based site search appliance possible -- but, still, sometimes you’re going to want to ‘game’ the system.
Manipulating site search results sounds nefarious, but really it’s all about providing the most relevant results to the end users. A well-defined site search doesn’t require manual tweaks to provide relevant results -- especially when it’s searching against site content that’s properly tagged, uses appropriate semantic markup, and is SEO friendly. However, sometimes it is necessary to tweak the results to provide something of particular, timely relevance.
A few weeks ago I developed a new Drupal module called Search Overrides, that can help.
Why AND WHEN TO Use Search Overrides
Maybe there’s a new page or document that provides the most relevant information that users want that hasn’t risen up the ranks; maybe there are casual alternatives (think: slang) of terminology that they’re not able to use internally, but for which they want to ensure that content can rank. Maybe all the results that show are good and relevant, but there’s one in particular we know should be on top because it’s the page people are calling a company’s helpline to find.
We do a tremendous amount of work on Apache Solr and this is one of the top requests we receive from clients -- the ability to tweak the search results from time to time. Based on our experience with a broad range of technologies, we know that there is similar functionality in search products like Cludo and Swiftype, so we felt that we needed to fill that gap in Solr.
The new Drupal module Search Overrides provides a method for site administrators with the necessary permissions to manually override the results returned by Search API Solr. In short, one can select which nodes will be placed at the top of results for specific search terms, and exclude nodes that they don’t want to have appear in the site search results.
This gives administrators tremendous flexibility to ensure search results align with user needs. Obviously, an algorithm-based search will provide relevant results, but sometimes it’s valuable to tailor specific items to your key audiences.
So what’s next? Refining and improving this module. After all, that’s one of the great things about the Drupal open-source community. We can create something that solves a need, but through constant iteration, testing, and getting the input of an exponentially larger group of Drupal contributors adding to this module, we can continue to make it better, more functional, and easier to use.
If you have any questions about contributions or if you want to contribute a patch to this module, it is greatly appreciated. And, feel free to reach out to me online or meet me in person at DrupalCon - where I will be leading a few of the Builder session tracks (Story City: Case Study and Making Drupal Fast: A Surgical Approach) and spending some time at our company booth, #708.