From 5494e551532d6a3646a007c88d0ad3d569a78a58 Mon Sep 17 00:00:00 2001 From: ketkee-aryamane Date: Wed, 20 Aug 2025 14:23:59 +0200 Subject: [PATCH 1/6] correct content per dev feedback --- solutions/search/query-rules-ui.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/solutions/search/query-rules-ui.md b/solutions/search/query-rules-ui.md index 1f1260dbb0..0c7575e20f 100644 --- a/solutions/search/query-rules-ui.md +++ b/solutions/search/query-rules-ui.md @@ -3,24 +3,26 @@ 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 certain keywords, phrases, or match defined 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 such as less than or greater than when rules apply +- 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). @@ -31,12 +33,12 @@ If you prefer to use the Query Rules API, refer to [Query Rules API]({{es-apis}} If you want to get full access to the Query Rules UI, you must have 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 you're not able to see the option, contact your administrator to review the role assigned to you. :::{image} /solutions/images/elasticsearch-query-rules-ui-home.png :alt: Landing page for Query Rules UI. From 899814653d71222e627fd9852b4416882e9cc6da Mon Sep 17 00:00:00 2001 From: ketkee-aryamane Date: Wed, 20 Aug 2025 15:00:25 +0200 Subject: [PATCH 2/6] link rule criteria --- solutions/search/query-rules-ui.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solutions/search/query-rules-ui.md b/solutions/search/query-rules-ui.md index 0c7575e20f..b018c57f0a 100644 --- a/solutions/search/query-rules-ui.md +++ b/solutions/search/query-rules-ui.md @@ -13,7 +13,7 @@ The Query rules UI provides a graphical interface to manage these rules without The UI enables you to: -- Set keyword or numerical conditions such as less than or greater than when rules apply +- 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 @@ -56,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. @@ -120,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: From 173425874e5243a80cd83d7f7018c94b64435f8a Mon Sep 17 00:00:00 2001 From: ketkee-aryamane Date: Thu, 21 Aug 2025 13:53:12 +0200 Subject: [PATCH 3/6] Update solutions/search/query-rules-ui.md Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> --- solutions/search/query-rules-ui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/search/query-rules-ui.md b/solutions/search/query-rules-ui.md index b018c57f0a..319c65d3fc 100644 --- a/solutions/search/query-rules-ui.md +++ b/solutions/search/query-rules-ui.md @@ -8,7 +8,7 @@ products: --- # Query rules UI -Use query rules to 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: From 63ae5554e632732dcd177765802400c0749135a5 Mon Sep 17 00:00:00 2001 From: ketkee-aryamane Date: Thu, 21 Aug 2025 13:53:50 +0200 Subject: [PATCH 4/6] Update solutions/search/query-rules-ui.md Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> --- solutions/search/query-rules-ui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/search/query-rules-ui.md b/solutions/search/query-rules-ui.md index 319c65d3fc..d08a261567 100644 --- a/solutions/search/query-rules-ui.md +++ b/solutions/search/query-rules-ui.md @@ -24,7 +24,7 @@ The Query Rules UI provides the same functionality as the API with one key diffe * 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). From cbd777a66a74fb01d5822563ad9e51c4962e0bd7 Mon Sep 17 00:00:00 2001 From: ketkee-aryamane Date: Thu, 21 Aug 2025 13:54:03 +0200 Subject: [PATCH 5/6] Update solutions/search/query-rules-ui.md Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> --- solutions/search/query-rules-ui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/search/query-rules-ui.md b/solutions/search/query-rules-ui.md index d08a261567..5a80d05d8a 100644 --- a/solutions/search/query-rules-ui.md +++ b/solutions/search/query-rules-ui.md @@ -30,7 +30,7 @@ If you prefer to use the Query Rules API, refer to [Query Rules API]({{es-apis}} ## 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 role with `manage_search_query_rules` cluster privilege From 1170979e20c7d10757f2ba97f403a36b9a3d572a Mon Sep 17 00:00:00 2001 From: ketkee-aryamane Date: Thu, 21 Aug 2025 13:54:19 +0200 Subject: [PATCH 6/6] Update solutions/search/query-rules-ui.md Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> --- solutions/search/query-rules-ui.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/search/query-rules-ui.md b/solutions/search/query-rules-ui.md index 5a80d05d8a..11bc74e645 100644 --- a/solutions/search/query-rules-ui.md +++ b/solutions/search/query-rules-ui.md @@ -38,7 +38,7 @@ For full access to the Query Rules UI, you need the following privileges: ## 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 your 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.