New Search Overrides Module

Digital Echidna logo in space

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.

We’ve already got some updates in mind that we’re going to work on. We’re looking at how to integrate role-specific overrides. So, for example, if a client of yours wants its staff to see a policy manual when they search “policy” but have the general public return a privacy policy, then the results could be tailored to return results based on roles. And right now the module only works with nodes, but ideally, this could extend to all items that are in the index, including media entities.

DrupalCon2019

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. 

Categories
Questions Answered

What is Search Overrides Module?

SUBSCRIBE TO OUR E-NEWSLETTER

CONNECT WITH US

Twitter Facebook Linkedin RSS