Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query rules docs clarification #98605

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

kderusso
Copy link
Member

Followup to #98540

  • Make the text consistent with the params used in the code snippets
  • A couple of extra clarifications

@kderusso kderusso added >docs General docs changes auto-backport-and-merge :EnterpriseSearch/Application Enterprise Search Team:Enterprise Search Meta label for Enterprise Search team v8.10.0 v8.11.0 labels Aug 17, 2023
@kderusso kderusso requested review from a team August 17, 2023 14:52
@github-actions
Copy link
Contributor

Documentation preview:

@kderusso kderusso requested a review from aznick August 17, 2023 14:52
@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label Aug 17, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ent-search-eng (Team:Enterprise Search)

Copy link
Contributor

@chriscressman chriscressman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@demjened demjened left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a question to clarify a metadata field name.

@@ -105,8 +107,8 @@ You can add query rules using the <<put-query-ruleset>> call. This adds a rulese

The following command will create a query ruleset called `my-ruleset` with two pinned document rules:

* The first rule will generate a <<query-dsl-pinned-query>> pinning the <<mapping-id-field,`_id`>>s `id1` and `id2` when the `user.query` metadata value is a fuzzy match to either `puggles` or `pugs` _and_ the user's location is in the US.
* The second rule will generate a <<query-dsl-pinned-query>> pinning the <<mapping-id-field, `_id`>> of `id3` specifically from the `my-index-000001` index and `id4` from the `my-index-000002` index when the `user.query` metadata value matches `beagles`.
* The first rule will generate a <<query-dsl-pinned-query>> pinning the <<mapping-id-field,`_id`>>s `id1` and `id2` when the `user_query` metadata value is a fuzzy match to either `puggles` or `pugs` _and_ the user's location is in the US.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kderusso I don't see user_query anywhere in the example that follows. Maybe it's my ignorance of query rules - is it an implicit metadata field? Or did you mean to refer to query_string?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, changing to query_string

@kderusso kderusso merged commit 8c12a7b into elastic:main Aug 17, 2023
kderusso added a commit to kderusso/elasticsearch that referenced this pull request Aug 17, 2023
* Query rules docs clarification

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.10

elasticsearchmachine pushed a commit that referenced this pull request Aug 17, 2023
* Query rules docs clarification

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc
csoulios pushed a commit to csoulios/elasticsearch that referenced this pull request Aug 18, 2023
* Query rules docs clarification

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc

* Update docs/reference/search/search-your-data/search-using-query-rules.asciidoc
@kderusso kderusso deleted the kderusso/query-rule-doc-fix branch July 8, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :EnterpriseSearch/Application Enterprise Search Team:Docs Meta label for docs team Team:Enterprise Search Meta label for Enterprise Search team v8.10.0 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants