Skip to main content
Rules affect the order in which products appear in your search results. Rules let you pin, boost, bury, and block specific items in your catalog. You can also use rules to display custom banners, redirect customers to a different page on your site, set facets, and more.

Rules vs. query rewrites

Both rules and query rewrites can be configured to help return the best search results to your users. Query rewrites allow you to alter and interpret search terms in multiple ways so relevant results are delivered. Rules changes the order in which search results are displayed, allowing you to promote certain items over others. Although query rewrites are configured in the Rewrites screen, you will see the effects of those rules on the Editor screen. Click your organization type to see examples of how to use rules to benefit your business goals:
B2C organizations use rules to promote the following to achieve business goals:
  • Products for marketing campaigns
  • New product launches
  • Products with inventory levels the organization wants to reduce
  • Any other business objective, such as increasing conversions
For example, a boost rule could be applied to promote summer sandals and clothing for an end-of-summer promotion.

How rules work

Rules contain conditions and actions. When a condition (or a combination of conditions) is met, the rule performs an action.

Conditions

You can trigger rules on a single condition or a combination of conditions.
TypeDescriptionNotes
DatesThe date and time range for the rule.Click the field to select a date and time, or enter manually. For example, 05/15/2026 12:00.
Field ValueThe field value to which the rule applies. For example, you can specify the Color field and set it to Color: Black.You can add multiple fields.
QueryThe query that triggers the rule.You must select a Query Matching Method to determine when a rule triggers.
● For the option is, the search query must match the defined term exactly. For example, if the rule is set to is “black shoes”, it only triggers when the user search is exactly “black shoes.”
● For the option contains, the search query must include one or more of the defined terms anywhere within the query. Each word is evaluated independently. For example, if the rule is set to contains “black shoes”, it triggers for any query containing “black” (such as “black boots”) and any query containing “shoes” (such as “running shoes”). The words do not need to appear together or in a specific order.
● For the option contains phrase, the search query must include the defined phrase in the exact word order entered. For example, if the rule is set to contains phrase “black shoes”, it triggers for “black shoes” or “mens black shoes,” but not for “shoes black” or “black running shoes.”
Query ProfileTrigger this rule on a specified query profile.This value must match an existing Fusion query profile, which points to a specific configuration.

Actions

You can only apply one action per rule. Commerce Studio alerts you if you create multiple rules with conflicting actions. For example, a conflict occurs if you create rules that boost, block, and bury the same item.

Rerank

Boost action

Boost

Increases the ranking of one or more products so they move up in the search results.
Boost by attributes
Boost slider
Boosts items matching on selected attributes up in the search results based on the weight of the slider selection. This is the recommended type of boost because it adapts to changing catalogs and reflects a broader merchandising strategy.
Boost items
Boosts specific items to the top of the results. These items must be identified individually. This approach is more precise but less flexible than boost by attributes.

Pin items

Pins products to an exact location within search results. This allows precise control over product placement. For example, you can ensure certain products always appear next to each other.
Another example is that you can pin a product to a specific position that reliably appears on page 2 after pagination. This capability requires the applicable Fusion patch to be installed. For more information, contact your Lucidworks support representative.

Bury

Moves selected items to the bottom of search results. Unlike the Block action, products are not removed entirely from the search results.
Bury by attributes
Boost slider
Buries items matching on selected attributes lower in the search results based on the weight of the slider selection. This is the recommended type of bury for the same reasons as boost by attributes. For example, you can use this to de-emphasize a particular brand in your results without removing it entirely.
Bury items
Buries specific items to the bottom of the results. These items must be identified individually. Like boost items, this approach is more precise but less flexible than bury by attributes.

Block

Removes selected items from search results entirely. Blocked items will not appear for matching searches.
Block by attributes
Applies block based on selected attributes. Products matching the specified attributes will be completely removed from search results.
Block items
Applies block to specific products that must be identified individually. These products will be completely removed from search results.

Facets

Manage facets

Customizes which facet categories appear in the query response, their display order, and their individual configuration settings. For example, if your site sells clothing, you can configure facet categories for brand, color, price, size, and other attributes. Each facet category can be extensively customized to control how values are displayed and how users interact with them.
Type
enum
default:"Term"
required
Specifies how facet values are generated. Term generates discrete values like brand names or colors. Gap Range generates numeric ranges like price brackets or size ranges.
Value Selection
enum
default:"Multi-select"
required
Controls how users can select facet values. Single-select allows users to choose only one value at a time. Multi-select allows users to choose multiple values simultaneously.
Value Order
enum
default:"Count"
required
Determines how facet values are sorted. Index sorts values in alphabetical or numeric order. Count sorts values by the number of matching products.
Minimum Count
integer
default:"1"
required
Sets the minimum number of matching products required for a facet value to be displayed. Values with fewer matches will be hidden from the facet list.
Boost Values
array
Promotes specific facet values higher in the list, making them appear more prominently to users.
Bury Values
array
Moves specific facet values lower in the list, de-emphasizing them without removing them entirely.
Block Values
array
Removes specific facet values from display entirely, preventing them from appearing in the facet list.

Advanced

Add banner

Associates an image URL with a search rule and includes it in the search results JSON response. You can specify the image URL and optionally define a page zone identifier. Your frontend application can then consume this data to dynamically display promotional banners or images alongside the corresponding search results.
Banner URL
string
required
The URL of the image to display as a banner.
Banner Zone
string
An identifier specifying which zone or area of the page the banner should appear in.
"banner": [{
  "url": "https://example.com/assets/holiday-banner.png",
  "zone": "top-wide"
}]

Filter items

Applies filter queries (fq) to the query and changes the results so a pre-selected set of content displays.

Set JSON configuration

Allows you to define a custom JSON blob that will be included in the search results response. You can input any valid JSON structure, which your frontend application can then interpret and use for custom functionality. This provides flexibility to pass arbitrary data alongside search results for frontend consumption.
Blob type
string
An optional identifier used primarily for categorizing or identifying the blob.
JSON blob
string
required
The custom JSON blob to include in the search results response.
"jsonBlob": {
  "example-blob": [{
    "event": "Black Friday Sale 2026",
    "startDate": "11/27/2026 00:00",
    "endDate": "11/27/2026 23:59",
    "description": "Our biggest sale of the year! Save up to 70% on select items during our Black Friday event.",
    "banner": {
      "url": "https://example.com/assets/black-friday-2026-banner.png",
      "zone": "top-wide"
    },
    "promotionCode": "BF2026"
  }]
},

Redirect

Includes a redirect URL in the search results JSON response. Your frontend application can consume this data to redirect users to a specific destination, such as dedicated landing pages or custom pages for queries that return zero results.
Path or URL
string
required
The URL or path to redirect users to.
"redirect": ["https://example.com/new-location"]

Set response value

Sends an arbitrary value to the frontend or pipeline to trigger another action. This action can be combined with other actions within the same rule. For example, an ecommerce website may use the response value action to display an advertisement.

Set parameters

Sets a parameter name and value to a search query. For example, the sort order for the results, or a filter that affects results.

Create rules

In addition to this demo, more information about the features of Commerce Studio Editor, including options to create rules for individual items, is detailed in the Commerce Studio Editor topic of the documentation.

Examples to improve search results using rules

Commerce Studio allows teams to apply targeted actions when a search query contains specific terms. These actions do not require code changes and support the following business goals to:
  • Improve relevance
  • Guide users to the content they are seeking
This section provides examples of how to use rules to improve search results.
B2B and B2C organizations can use rules to improve product discovery and merchandising outcomes by performing the following actions. These examples describe some actions for a bookstore website.
  • Promote high-priority products. Boost books from a popular series so they appear higher in search results when users search by author name.
  • Remove outdated or unavailable items. Block discontinued titles to ensure only relevant, purchasable books appear in results.
  • Highlight specific products. Boost selected new or overstocked titles to increase visibility and drive sales.
  • Refine results by intent. Filter results to show only children’s and young adult books when users search for children’s content.
  • Improve ranking within related groups. Boost items within a series so the most popular titles appear first when users search for that series.
  • Manage available facets. Display genre facets on the homepage and top author facets on search results pages to help users refine results.
  • Apply advanced configurations. Use a Set Banner rule to display a promotional banner when users search for mystery titles.