Function Rule

Description:

Using the Expression Builder, users can construct rules that will alter the way the search engine searches and displays the results. 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, Sorting Function Rule and a Regular Function Rule.

How do I add a Sort Function / Regular Function Rule?

  1. Click and open the relevancy model to which you want to add a Sort/Function Rule Term. Make sure this model is in the Draft or Benchmarked state.
  2. Click on the Sort Function / Regular Function Rule label inside the model. On the right-hand side it should display all the Function Rules that have already been set.
  3. Locate a circular (+) button and click on it, and this will bring up a menu. Here you can choose to create a new Sort Function, regular function or a function rule with the help of a template. Clicking on any of these options will bring up the popup with the Expression Builder.
  4. Here you can enter the basic information, execution triggers and execution configurations. The options within these categories will change depending on the type of function rule you are creating. Refer the Expression Builder documentation for further help on how to build expressions.
  5. Click on Save to save the rule

Refer below screenshot to add function rule.

How do I edit a Function Rule?

  1. Click and open the relevancy model from which you want to edit a Function Rule. Make sure this model is in the Draft or Benchmarked state.
  2. Click on the Function Rules label inside the model. On the right-hand side it should display all the Sort Function / Regular Function Rules that have already been set.
  3. 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.
  4. 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 exists exist within that model.

What are Execution Configurations?

Execution Configurations are a set of options that dictate how the function rule will behave

What are Execution Triggers?

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

What are Function Templates?

Function Templates are just like regular function rules, except for the fact that they have been saved as a template. Templates can be used to save a more complex function rule as an outline. This outline can later be used to create rules more easily, without having to recreate them from scratch.

How to create Function Templates?

Creating a function Template is exactly like creating a function rule, except for the fact that while saving the rule you click on the button Save as Template. Then in the Create Function rule drop-down, the newly created template will be added.

What are Expression Macros?

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

How do I delete a Function Rule?

  1. Click and open the relevancy model from which you want to delete a Function Rule. Make sure this model is in the Draft or Benchmarked state.
  2. Click on the Function Rules label inside the model. On the right-hand side it should display all the Sort Function / Regular Function Rules that have already been set.
  3. Under the Actions column, there will be a Trash icon. Clicking on it will delete the rule.