Crafting Relevance Models in SearchStax Studio | SearchStax Blog

Crafting Relevance Models in SearchStax Studio

In this article

Relevance Models in SearchStax Studio are designed to improve the overall search experience by fine-tuning how Studio responds to search queries. Before diving into the configurations, set your goals. What defines a “relevant” result for your users? Whether you want to give higher priority to more recent content, content from a specific author, or those containing specific keywords, these goals will guide your customization.

Preliminary Steps: Assessing Available Fields

Before you begin, review the available fields in your schema. Knowing the type of each field, whether it’s textual, numerical, or date, is essential as this understanding will guide the kind of rules and boosts you set up later.

Fields are usually categorized into two types:

Understanding the type of each field is crucial for setting up effective rules and boosts.

Navigating to Relevance Modeling Screen

To access the Relevance Modeling features, you’ll either create a new model or modify an existing one. If you’re creating a new model, ensure you use a descriptive, unique name for easy identification later on.

Model Details Screen

Upon accessing the Relevance Model, you’ll find various tabs:

Precedence of Features

It’s crucial to know that these features are applied in a specific order: Global Filters come first, followed by Ranking, Rules, and finally Promotions.

Search Fields Tab

Overview

The Search Fields Tab is essential for shaping your Relevance Model in Studio. It allows you to specify which fields Studio will scan when a search query is made.

Key Fields

Usage

To add a field, click its name in the list of available fields. To remove, click the ‘X’ next to the field name.

Impact

Global Filters Tab

Overview

The Global Filters Tab in Studio lets you set universal constraints that influence all search queries.

Key Concepts

Usage

Select a Search Field, input a Value, and then click the (+) button to add a filter. To delete a filter, click the corresponding ‘X’.

Impact

Ranking Tab

Overview

The Ranking Tab in Studio empowers you to fine-tune the relevance scores of search results. You have the flexibility to apply boosts based on specific search fields, field values, or even custom functions for more nuanced adjustments.

Key Concepts

Usage

  1. Boost by Search Field:
    • Select “Search Field” from the options and choose the specific field you want to boost.
    • Use the slider to adjust the boost multiplier.
  2. Boost by Field Value:
    • Select “Field Value” and input both the field name and value you wish to boost.
    • Use the slider or input fields to specify the boost.
  3. Boost by Function:
    • Select “Function” and input a custom function that returns a numerical value.
    • This function will dictate the boost applied to each item.

Adjust the sliders or directly enter values in input fields to set the boost multipliers. The higher the multiplier, the more prominently the result will appear in search listings.

Impact

Rules Tab

Overview

The Rules Tab in Studio’s Model Details screen is a powerful feature that enables you to fine-tune the search experience for your users. By creating rules, you can modify the search results based on specific triggers or conditions.

Different Types of Actions

There are four primary actions that a rule can take when a specific trigger is met. You can use these actions individually or in any combination:

  1. Replace Search Term: Modify the search query by replacing the trigger phrase or word with another term.
  2. Filter on a Field Value: Apply dynamic filtering to the search results based on a field value.
  3. Boost Using a Field Value: Increase the relevance score of specific search results based on the value of a particular field.
  4. Boost Using a Function: Apply a mathematical function to boost certain results based on a dynamic condition.

Creating Rules

To create a new rule, navigate to the Rules Tab and select the ‘Add Rule’ option. This will open up a form where you can specify the conditions and actions for the rule.

Example Rule: Python Query

Context

In this example, we’ll consider a simple use case where a user enters the query “Python.”

Actions and Configurations

Actions to Take

  1. Replace Search Term
    • Value: Python
    • Action: Replace “Python” with “Programming” to widen the search scope.
  2. Filter on a Field Value
    • Value: Scripting Language
    • Search Field: summary
    • Action: Only show results that have “Scripting Language” in their summary, eliminating irrelevant results.
  3. Boost Using a Field Value
    • Value: Python
    • Search Field: tags
    • Ranking Boost: 50
    • Action: Increase the relevance score of documents that have the term “Python” in their tags.
  4. Boost Using a Function
    • Function: ms(date)
    • Action: Prioritize newer documents in the search results.

Impact

Promotions Tab

Introduction

Promotions are one of the most powerful features you have at your disposal. It allows you to curate a list of search results and promote specific items to the top of the list, ensuring that the most critical or relevant information gains maximum visibility. This feature gives you control over the search experience, allowing you to guide your users to what matters most.

Types of Promotions

You can set up different types of promotions to customize the search experience:

  1. Simple Promotions: These are internal promotions. You specify a query that will trigger this promotion and then select items from your own indexed content to promote.
  2. External Promotions: These allow you to highlight external content, such as event sites or partner pages.

Creating Promotions

To set up a promotion, go to the Promotions Tab and click on ‘Create’. This will prompt you to configure the promotion’s trigger and specify which items should be promoted.

Trigger Types

The trigger for a promotion can be set up in one of two ways:

The choice between these two options depends on how broad or narrow you want the trigger to be. An exact match will be more restrictive but more targeted, while a “contains” condition will capture a broader set of queries.

Impact

With the Promotions Tab, you’re in the driver’s seat:

Transparency

You can choose whether or not to disclose to users that an item has been promoted. For instance, each promoted result can optionally contain a special field value like [elevated]:true.

Final Steps: Saving and Publishing

Once you have configured your Relevance Model, make sure to save your settings. If you’re ready to apply the changes, go ahead and publish the model.

How to Use: Use the ‘Save Draft’ and ‘Publish’ buttons at the bottom of the screen to finalize your settings.


This guide should cover all the necessary aspects of creating a well-tuned Relevance Model in SearchStax Studio. With these settings, you can significantly enhance the user search experience, ensuring that the most pertinent and useful results are presented to the end-user.