November 17, 2022
Tyler Huff
|
When it comes to site search, some keywords that users type into the search bar can be tricky. Maybe your customers search for specific content you simply don’t have, so you need to redirect them to similar content. Maybe you want to prioritize a certain type of content when a user includes a specific keyword in their search. Whatever the end result, you want your search to have certain rules based on conditions or keywords.
SearchStax Site Search has a Rules-based feature that lets marketers shape the search experience for their website visitors. Let’s see how Rules work and how some of our customers are using the feature.
A rule is an if-then command that has a condition (trigger) and an action or actions that follow. Within SearchStax Studio, the trigger is the query or keyword that a user types into the search bar on a website.
Rules are one of the features that make up what we refer to as a Relevance Model in Studio and consist of a Trigger and Action.
The trigger can be set using one of two options: Contains or Exact Match.
With Contains, the triggering keyword has to be contained in the query such as “site” in the phrase “site search.”
For Exact Match, the triggering keyword or keywords must match the query exactly. For example, the query “site search” must exactly match the trigger “site search.”
Actions are where it starts to get interesting. You can choose from four unique actions and add as many as you like to a rule. Let’s look at each one.
Rules are helpful for one simple reason. They are query specific.
What does that mean exactly? All the actions listed above can be set up in Studio to run for every search or regardless of the search keyword. In some cases, that’s useful, but not for all search queries. Rules let you take advantage of the actions, but only for certain conditions or triggers.
You may not always want to favor your blogs over case studies. You may want to prioritize documentation content over blogs when a user searches for documentation. What if a user searches for “most recent blogs”? In that case you want to favor recently published content over old content. The examples are endless, but the idea is that sometimes you want actions to fire only on certain conditions.
Let’s take a look at customer examples to nail down the idea.
What do students often search for at universities? Their GPA or grade point average. Now because of how Solr works, when a student searches for “grade point average,” the search engine will find matches for “grade,” “point” and “average.”
In this case however, we know students are searching for their GPA. So this rule replaces the keywords “grade,” “point” and “average” with the more accurate key phrase, “grade point average.” Now, Studio will only look for exact “grade point average” matches to find more relevant results.
Example of a rule within SearchStax Studio that replaces a search term with another
Now, let’s take a look at what another customer has done. They are a local government entity. Their users can search through all the legislation and bills that have passed.
In this case, all legislation related content has “BL” in it, short for Bill. So the trigger is any search that has “bl” contained in it. Users searching for a keyword with “bl” in it are likely looking for bill or legislation related content.
Now the bulk of the legislation related content is located in two subdomain sites that are indexed into Studio – legistar and legisarchive. So, the actions in this case are boosting the content from the legistar and legisarchive sites by 55 out of 100.
The end result is, when a user searches for something with “bl” contained in it, content from the legistar and legisarchive sites are prioritized and appear higher in the search results.
A rule boosting two field values within SearchStax Studio
Last, we have my favorite rule. The trigger is simple – any query that has “podcast” contained in it. So, users are likely searching for different podcasts when this rule is triggered.
Let’s take a look at the first action – Boost using a function. The Solr function in this case is recip(ms(NOW,ds_publish_date),3.16e-11,10,1). Sparing the technical details, the point of this function is to favor recently published documents. You can see the field ds_publish_date that the function (it’s technically two Solr functions) acts on.
Now on to the second action – boost using a field value. In this case the field is “content type” and the value is “podcast.” So podcasts will be prioritized in the search results.
If you combine both actions, you get recently published podcasts bubbling up to the top results when a user searches for something with “podcast” in it, which is exactly what a user would expect.
A rule boosting both a function and a field value within SearchStax Studio
The Stack is delivered bi-monthly with industry trends, insights, products and more
Copyrights © SearchStax Inc.2014-2024. All Rights Reserved.
SearchStax Site Search solution is engineered to give marketers the agility they need to optimize site search outcomes. Get full visibility into search analytics and make real-time changes with one click.
close
SearchStax Managed Search service automates, manages and scales hosted Solr infrastructure in public or private clouds. Free up developers for value-added tasks and reduce costs with fewer incidents.
close
close