Query Rules

Description:

Query Rules uses the Expression Builder to construct rules. Using the Expression Builder, user can construct rules to apply a filter or boost a query. Expression Builder can help users to fine-tune the way they want the results to appear when a search is conducted. There are two different type of rules a user can create, Filter Query Rule and Boost Query Rule.

How do I add a Filter Query/ Boost Query?

  1. Click and open the relevancy model to which you want to add a Filter/Boost Query Rule. Make sure this model is in the Draft or Benchmarked state.
  2. Locate a circular (+) button and click on it, and this will bring up a menu. Here you can choose to create a new Filter Query or Boost Query. Clicking on any of these options will bring up the popup with the Expression Builder.
  3. Here you can enter the basic information, execution triggers and execution configurations. The options within these categories will change depending on the type of query rule you are creating. Refer to the Expression Builder documentation for further help on how to build expressions.
  4. Click on Save to save the rule.

Refer below screenshot to add a query rule,

How do I edit a Query Rule?

  1. Click and open the relevancy model from which you want to edit a Query Rule. Make sure this model is in the Draft or Benchmarked state.
  2. Under the Actions column, there will be a Pencil icon. Clicking on it will bring up the same popup you used while creating the rule. Here you can make the necessary changes and then click on Save.
  3. If the save is successful, the edited text will remain in black color. However, if the text color changes to red, then there is an error. Refresh the page and check if the rules already exist within that profile.

What are Execution Configurations?

Execution Configurations are a set of options that dictate how the Query Rule will behave

What are Execution Triggers?

Besides the rule being is active, the user can specify conditions where the rule can be triggered during query time.

How do I delete a Query Rule?

  1. Click and open the relevancy model from which you want to delete a Query Rule. Make sure this profile is in the Draft or Benchmarked state.
  2. Under the Actions column, there will be a Trash icon. Clicking on it will delete the rule.

What are Expression Macros?

While creating rule, the user might find it beneficial to use a rule within another rule. This can be done with the help of Expression Macros. After creating and saving a rule, it will be available to be used as part of another rule. The newly created rule will be part of the drop-down list in the Expression Builder under the sub-heading "Expression Macros". While saving the Query Rule, if the expression contains macros, the expression macros are replaced by their accompanying expressions.

How do I delete a Query Rule?

  1. Click and open the relevancy model from which you want delete a Query Rule. Make sure this model is in the Draft or Benchmarked state.
  2. Under the Actions column, there will be a Trash icon. Clicking on it will delete the rule.