> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# General configurations

> Business rules

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/lucidworks-search/07-improve-your-queries/business-rules/general-configurations

[mintlify link]: https://doc.lucidworks.com/docs/lucidworks-search/07-improve-your-queries/business-rules/general-configurations

[old doc.lw link]: https://doc.lucidworks.com/managed-fusion/5.9/oitb8y

General configurations are used to characterize a rule, including its name, description, group, and more. They are also used to set a rule’s precedence, or priority over other rules.

<LwTemplate />

## Configuration options

| Required | Parameter   | Description                                                                                                                                                                                                                | Example                                                                   |
| -------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| ✅        | Name        | A user-friendly name for the rule.                                                                                                                                                                                         | `headphones-sale-01`                                                      |
|          | Description | A description of the rule for the person who manages business rules. This is an arbitrary value which has no effect on the rule’s purpose or execution.                                                                    | `"Rule for the upcoming sale on headphones. Boosts limited stock items."` |
|          | Rule Group  | See [Rule Group](#rule-group) for more information.                                                                                                                                                                        |                                                                           |
|          | Tags        | See [Tags](#tags) for more information.                                                                                                                                                                                    | `browse-rule`, `search-rule`                                              |
|          | Precedence  | Determines when rules should take effect in relation to other triggered rules. A higher number means higher precedence. For example, a rule with precedence of `10` will take effect before a rule with precedence of `3`. | `10`                                                                      |
| ✅        | Enabled     | Determines whether the rule is enabled. If set to `false`, the rule will not fire under any conditions.                                                                                                                    | `true`                                                                    |

### Rule group

Rule groups are used for logically grouping rules for interpretation and debugging purposes. The rule group is specified in the debug response. It does not affect which rules fire.

### Tags

Tags are assigned in the UI. By using tags, you can:

* **Quickly sort rules.** Tags appear in the facet options of the Business Rules editor for fast sorting. Click a tag facet to see all rules associated with the tags.
* **Easily define triggers.** Triggers are associated with tags to determine the conditions under which the rules fire. This reduces the number of triggers needed and speeds up the development process.\
  To target which rules fire, you can specify one or more tagnames in the request URL of the user search app. The rule containing the matching tagname is triggered. For example:

  * One pin rule is defined with "pin the document titled **Brussel Sprouts** when someone searches for garden", and it is tagged with `vegetable`.
  * A second pin rule is defined with "pin the document titled **Tomato** when someone searches for garden", but it is *not* tagged with `vegetable`. Instead, this rule is tagged with `fruit`.
  * A third pin rule is defined with "pin the document titled **Vegetables** when someone searches for garden", and it is tagged with `vegetable`.\
    If the request URL is:

    `https://EXAMPLE_COMPANY.lucidworks.cloud/api/apps/APP_NAME/query/QUERY_PROFILE?q=garden&tags=vegetable`, then only the first and third rules are fired.\
    To fire all three rules, the request URL is:

    `https://EXAMPLE_COMPANY.lucidworks.cloud/api/apps/APP_NAME/query/QUERY_PROFILE?q=garden&tags=vegetable,fruit`.

  <Note>
    Replace `EXAMPLE_COMPANY` with the name provided by your Lucidworks representative.
  </Note>
* **Separate rules by development stage.** You can add the tags `development`, `testing`, and `production` to distinguish between rules in various stages of development.
* **Define different search experiences.** In some cases, you may want to define a different experience for users who browse and users who search. Keep track of these experiences by tagging the rules accordingly.

Tags are also included in the response results:

```json wrap  theme={"dark"}
{
  "response" : {
    "numFound" : 213,
    "start" : 0,
    "maxScore" : 0.0,
    "docs" : [ ... ]
  },
  "facet_counts" : {
    "facet_fields" : {
      "tags" : {
        "development" : 1,
        "testing" : 3,
        "production" : 2,
      }
    },
    "facet_ranges" : { }
  }
}
```
