Query Rules

Query rules offer a robust mechanism for customizing search outcomes, granting businesses the ability to apply targeted configurations at the query level. Once a rule is configured, it will modify the search results corresponding to that specific query, aligning them with business goals and user search intentions.

By leveraging these rules, businesses can prioritize, highlight, or modify search results to align with marketing strategies, ensuring that key offerings or content are prominently displayed. This enhances product visibility, drives engagement, and can directly influence sales and content consumption, ultimately contributing to the business's bottom line.

On this interface, you can look up existing rules by typing in specific queries or by filtering according to various criteria like action type, status, the user who updated it, and the time of update.

Actions :-

Redirect - This rule reroutes the user to a designated URL/landing page when they search for a particular term. For instance, if a user searches for "smartphone deals," they could be redirected to a promotional page with the latest discounts on smartphones.

Use-cases:

Special Offers: Redirecting searches for "summer discounts" to a seasonal sales page with current promotions in retail.

Resource Directing: Redirecting general inquiries such as "investment tips" to a dedicated advice column or educational content section on a financial website.

Boost - Boosting a set of product using one or more attributes pushes them ahead of other products. This can be done by assigning a Boost Factor value. By applying a Boost, certain attributes or items are given priority in search results.

For example, you could boost products with high ratings so that they appear before lower-rated products when users perform a search.​

The 'Boost Factor' slider allows you to manipulate how much weight is given to certain attributes within your search algorithm. Moving the slider towards +100 applies a 'hard boost,' significantly increasing the visibility and ranking of items with the chosen attributes. This means they are more likely to appear at the top of search results, which can be particularly useful for promoting new releases, bestsellers, or items with higher profit margins.

On the other hand, sliding towards -100 applies a 'hard bury,' which dramatically lowers the ranking of items with certain attributes, pushing them towards the bottom of the search results. This could be used for items that are out of stock, less profitable, or perhaps lower in customer satisfaction.

The closer the slider is to the middle (0), the more subtle the effect. A slight adjustment towards the positive side gives a 'soft boost,' enhancing visibility without dominating, while a slight adjustment towards the negative provides a 'soft bury,' decreasing visibility without hiding items completely.

Note: You can apply boost on multiple attributes as well as apply multiple boost groups by applying different boost factors. For instance, if the store wants to promote "Brand A" and "Brand B," they might assign a higher boost factor to "Brand A" for its premium status and a slightly lower boost factor to "Brand B" to balance visibility. This approach ensures that when customers search for relevant product categories, items from both "Brand A" and "Brand B" appear higher in the search results than other brands, effectively driving focus and sales to these targeted brands.

Use-cases:

Product Promotion: Boosting visibility of a newly launched product line to appear higher in search results in an e-commerce store.

Highlighting Content: Increasing the ranking of premium or important editorial content, such as in-depth guides or expert columns, when users search for related topics.

Pin - Pinning ensures that certain items appear at the top of the search results. For instance, a new electronics release might be pinned to ensure visibility regardless of the search criteria entered.

Product or SKU IDs can be strategically anchored to designated positions within search results. The scope of these slots, however, is confined to the maximum count of search results as determined by the pagination settings and is limited to the first results page only.

Use-cases:

Featured Products: Pinning a flagship product at the top of search results for related queries in an online store.

Top Articles: Ensuring a critical analysis piece remains at the top of search results for relevant queries on a news or content platform

Query Rewrite - This action allows the search query to be automatically replaced with another, often to prevent no results from being found. For instance, a misspelled product name could be automatically corrected to ensure relevant results are displayed.

Here are the options within this feature:

Replace: This option is used when you want to substitute a user-entered search term with another term. For instance, if a user searches for "wireless earbuds," but the store's preferred terminology is "Bluetooth headphones," the search term can be replaced to ensure that users are directed to the most relevant product listings.

Drop: The drop option removes certain terms from a search query. It can be useful for ignoring irrelevant or unhelpful terms that might complicate the search results. For example, if users tend to include terms like "cheap" or "discount" in their searches which don't correspond to any specific product attributes, these can be dropped to prevent skewing the search results.

Drop All: This action clears the entire search query, which might be used in situations where a query consistently yields poor or irrelevant results. Following the drop, the search system could provide suggestions or categories to help the user refine their search.

Additionally, you can include a custom message with any of these rewrites to explain to users why their search was altered, which can be a valuable tool for transparency and to maintain a good user experience. For example, if a product has been discontinued and the query is rewritten or terms are dropped, a message could let users know that they are being shown the best available alternatives.

Use-cases:

Alternative Suggestions: Rewriting a discontinued product search to similar available products in e-commerce.

Topic Consolidation: Automatically redirecting fragmented topic searches like "stock advice" or "investment strategies" to a comprehensive guide on a financial education portal

Slot - This specifies the range of positions where a product attribute will show up in search results. For example, you might slot sponsored products to appear within the top five results.

Start Position: This is where the slotted items will begin to appear in the search results. For instance, if you set the start position to 1, the item you are slotting will appear first in the search results.

Number of Items: This refers to how many items you want to slot into the specified start position. If you choose more than one item, the system will slot the specified number of items starting from the start position.

Step Size: This indicates the interval at which slotted items will appear. For example, if the step size is set to 1 and you are slotting multiple items, they will appear consecutively. If the step size is larger, there will be a gap of that many positions between each slotted item.

The scope of these slots, however, is confined to the maximum count of search results as determined by the pagination settings and is limited to the first results page only.

Use-cases:

Sponsored Products: Slotting sponsored or advertised products within the top search results on a retail site.

Featured Stories: Ensuring sponsored stories or important news articles maintain a prominent position within the first few search results on a content site

Sort - Sorting organizes search results based on specified attributes, like price or relevance. For instance, a search for "laptops" might sort results from lowest to highest price.

Use-cases:

Sorting by Relevance: Arranging products by relevance or popularity when a vague search term is entered in an online shop.

Sorting by Date: Ordering articles or reports by publication date when users search for the latest news on a content platform.

Filter - Filters narrow down search results by certain attributes. For example, a filter could be applied to only show available products when someone searches for "digital cameras."

Use-cases:

Stock Filters: Filtering out stocks not matching user-specified criteria like 'dividend-paying' or 'under $10' on an investment platform.
Article Filters: Excluding certain content types, such as opinion pieces, when a user is searching for strictly factual reports.

Custom - This action allows you to write custom rules in JSON format, which provides a high level of specificity and control over search results. This can include conditional statements, complex queries, and more detailed instructions for how search results should be handled.

For instance, an e-commerce platform wants to create a rule where products are boosted based on a combination of factors like stock levels, margin, and seasonal relevance. A JSON query can be written to increase the ranking of products that have high margins and are in season but only if the stock levels are above a certain threshold.

Featured - This action is designed to enhance the visibility of certain products or content that may have strategic importance, such as sponsored items or partnerships with brands. It typically involves giving these items a higher ranking in search results.

For instance, an online marketplace has a partnership with an electronics brand launching a new smartphone. Using the "Featured" action, the marketplace can ensure that searches related to smartphones prominently display this new model at the top of the search results.

Note:

  1. You can apply multiple types of rule to a search query, except for "Redirect". Redicrect cannot be used with other actions​.
  2. Rule Priorities​:

Filter > Pin > Slot > Sort > Boost ​


Add Query rules -

  1. Go to Query rules under Rules,
  2. Click on add Query rule in the top right corner,
  3. Select the conditions and required settings, and save to successfully add the rule.

Conditions: Query rules are based on two conditions to choose from i.e. Query Matches Exactly and Query Contains.

Query Matches Exactly: This condition triggers the rule only when the user's search query exactly matches a specified term. It is precise and won’t activate for variations of the term.
Query Contains: Unlike "Query Matches Exactly," this condition triggers the rule if the user's search query contains the specified term, regardless of what other terms might be included in the search.

Note: A single rule can be applied to one or more queries at the same time by hitting enter and adding other query terms.

Segments: This option allows you to apply rules to specific user segments. For example, you could target a promotion only to users identified as "frequent buyers" or "new customers".

Channels: Here, rules can be applied to different channels such as mobile, web, or specific regional storefronts. It ensures that rules are effective only within the relevant channel's context.

Schedule:

Always On: The rule is active at all times once saved and does not expire unless manually turned off or deleted.

Date Range: This setting allows you to schedule a rule to be active only within a specific date range, useful for time-bound promotions or seasonal content

Edit Query rules -

  1. Go to Query rules under Rules,
  2. Click on the three dots and select the Edit option,
  3. Make the change that you want and click on the Save button to confirm.

Clone Query Rules -

  1. Go to Query rules under Rules,
  2. Click on the three dots and select the Clone option,
  3. Make any changes if you want in the cloned rule and click on the Save button to confirm.

Delete Query Rules -

  1. Go to Query rules under Rules,
  2. Click on the three dots and select the Delete option,
  3. Confirm that you want to delete the rule and it will be deleted.