Business Rules

Business rules are manually-created formulas for rewriting queries. This is the most versatile strategy for creating custom query rewrites. It supports a variety of conditions and actions to address a wide range of use cases. When you need a very specific query rewrite, this is the best strategy.

Business rules are applied in the Apply Rules stage of the query pipeline.

Instructions for creating a new business rule are below. See Business Rules to learn more about how to use business rules.

How to create a new business rule
  1. Navigate to Relevance > Query Rewriting.

    Relevance menu

  2. Under Business Rules, click View.

  3. Click the Add icon icon.

    The New Rule window appears:

    New Rule window

    General Condition Action

    In the General column, only the Name field is required. Other fields are optional:

    • Description is an arbitrary string you can use to describe this rule.

    • Rule Group can be a user-defined group that you use to organize your rules.

    • Tags are another way to organize your rules. Tags appear as facets in the Business Rules interface, so you can filter the set of visible rules by tag.

    • Priority can be used to determine which rule should apply first if multiple rules are activated for the same request. Priority is an integer value, ranging from 1 to infinity, with the value 1 given highest priority. If multiple rules have the same value, those rules are applied in a random order.

    • Enabled means that this rule is applied (but not necessarily published). Disabling a rule helps ensure that it is not accidentally published.

    Conditions are triggers that activate the rule when they match the current date and time, query, or field values.

    See Rule conditions below.

    A rule can take different types of actions when the specified conditions are met.

    See Action types below. You can also create custom actions.

  4. Click Save.