diff --git a/solutions/search/query-rules-ui.md b/solutions/search/query-rules-ui.md index 1f1260dbb0..11bc74e645 100644 --- a/solutions/search/query-rules-ui.md +++ b/solutions/search/query-rules-ui.md @@ -3,40 +3,42 @@ applies_to: stack: ga 9.1 serverless: ga elasticsearch: +products: + - id: elasticsearch --- # Query rules UI -Use query rules to boost, pin, or exclude specific documents when queries contain certain keywords, phrases, or match defined search patterns. +Use query rules to pin or exclude specific documents when queries contain specific keywords or phrases, or match specific search patterns. The Query rules UI provides a graphical interface to manage these rules without writing API calls or JSON configuration. The UI enables you to: -- Set keyword triggers and conditions for when rules apply -- Pin, boost, or exclude specific documents in results +- Set keyword or numerical conditions. For a full list of options, refer to [Rule criteria](elasticsearch://reference/elasticsearch/rest-apis/searching-with-query-rules.md#query-rule-criteria). +- Pin or exclude specific documents in results - Organize rules into rulesets and set execution priority - Test rules against sample queries before publishing ## UI vs. API: What's the difference? -The Query Rules UI provides the same functionality as the API with one key difference in how documents are pinned: +The Query Rules UI provides the same functionality as the API with one key difference: -* The UI defaults to `docs` for maximum flexibility, but still allows `id`-based pinning for single-index searches through a simplified form. +* The UI defaults to `docs` for creating and editing rules. You cannot edit an `id` based rule that was created through the API. -To see examples of how to search using query rules, refer [Search using Query Rules API](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules). +For examples of how to search using query rules, refer to [Search using Query Rules API](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules). If you prefer to use the Query Rules API, refer to [Query Rules API]({{es-apis}}group/endpoint-query_rules). ## Requirements -If you want to get full access to the Query Rules UI, you must have the following privileges: +For full access to the Query Rules UI, you need the following privileges: * Appropriate roles to access Kibana. For more information, refer to [Built-in roles](https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/built-in-roles) or [Kibana privileges](https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/kibana-privileges) -* A custom role with `manage_search_query_rules` cluster privilege +* A role with `manage_search_query_rules` cluster privilege * `ALL` option for `Query Rules` role privilege in the respective Kibana space ## Accessing the Query Rules UI -Go to your deployment and select **Query Rules** from the left navigation menu under **Relevance**. If you're not able to see the option, contact the administrator to review the role assigned to you. +Go to your deployment and select **Query Rules** from the left navigation menu under **Relevance**. If the option does not appear, contact your administrator to review your privileges. :::{image} /solutions/images/elasticsearch-query-rules-ui-home.png :alt: Landing page for Query Rules UI. @@ -54,13 +56,13 @@ Use the following steps to first create a query ruleset, and then a query rule: - **Pin**: Pin selected documents to the top of the search results. - **Exclude**: Exclude selected documents from the results. - For more information on rule types, refer [Rule types](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules#query-rule-type). + For more information on rule types, refer to [Rule types](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules#query-rule-type). 4. Select one or more documents for the rule to apply to. 5. Select one of the following rule criteria: - **Always**: Apply the rule to all queries - **Custom**: Define conditions when the rule is applied. - For a full list of options, refer [Rule criteria](elasticsearch://reference/elasticsearch/rest-apis/searching-with-query-rules.md#query-rule-criteria). + For a full list of options, refer to [Rule criteria](elasticsearch://reference/elasticsearch/rest-apis/searching-with-query-rules.md#query-rule-criteria). 6. Select **Create rule**. 7. Select **Save** in the top right corner of the ruleset section. @@ -118,7 +120,7 @@ To test a query ruleset, do the following: ## Learn more -Following resources can help you understand query rules better: +The following resources can help you understand query rules better: Blogs: