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] clarify query rules API documentation #100732

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

kderusso
Copy link
Member

We received feedback that different examples of match_criteria in various parts of the query rules documentation was confusing. This PR streamlines the examples in our query rules documentation (APIs, rule query and search guide).

@kderusso kderusso added >docs General docs changes :EnterpriseSearch/Application Enterprise Search Team:Enterprise Search Meta label for Enterprise Search team v8.11.0 v8.10.1 v8.12.0 labels Oct 11, 2023
@github-actions
Copy link
Contributor

Documentation preview:

@kderusso kderusso requested review from ppf2 and a team October 11, 2023 20:24
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label Oct 11, 2023
@elasticsearchmachine
Copy link
Collaborator

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

@kderusso kderusso added auto-backport-and-merge and removed Team:Docs Meta label for docs team labels Oct 11, 2023
@@ -109,8 +109,8 @@ The following example creates a new query ruleset called `my-ruleset`.

Two rules are associated with `my-ruleset`:

- `my-rule1` will pin documents with IDs `id1` and `id2` when `user.query` exactly matches `marvel` _or_ `dc` **and** `user.country` exactly matches `us`.
- `my-rule2` will pin documents from different, specified indices with IDs `id3` and `id4` when the `query_string` fuzzily matches `comic`.
- `my-rule1` will pin documents with IDs `id1` and `id2` when `user_query` contains `pugs` _or_ `puggles` **and** `user_country` exactly matches `us`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the switch from dot notation here? (e.g. user.query -> user_query)

Copy link
Member Author

Choose a reason for hiding this comment

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

The feedback was that all of our examples should be consistent. So since we were using user_query everywhere else, it was easier to update this one document over the others.

@leemthompo
Copy link
Contributor

Looks good, but I'll defer to team for technical 👁️ 🔍

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
@elasticsearchmachine elasticsearchmachine added the Team:Docs Meta label for docs team label Oct 12, 2023
Copy link
Member

@carlosdelest carlosdelest left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kderusso kderusso merged commit bfc87d4 into elastic:main Oct 13, 2023
kderusso added a commit to kderusso/elasticsearch that referenced this pull request Oct 13, 2023
* Update example in query rules docs

* Ensure GET docs are also consistent

* Update docs/reference/query-rules/apis/put-query-ruleset.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.11
8.10

kderusso added a commit to kderusso/elasticsearch that referenced this pull request Oct 13, 2023
* Update example in query rules docs

* Ensure GET docs are also consistent

* Update docs/reference/query-rules/apis/put-query-ruleset.asciidoc

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
elasticsearchmachine pushed a commit that referenced this pull request Oct 13, 2023
* Update example in query rules docs

* Ensure GET docs are also consistent

* Update docs/reference/query-rules/apis/put-query-ruleset.asciidoc



---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
elasticsearchmachine pushed a commit that referenced this pull request Oct 13, 2023
* Update example in query rules docs

* Ensure GET docs are also consistent

* Update docs/reference/query-rules/apis/put-query-ruleset.asciidoc



---------

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
@kderusso kderusso deleted the kderusso/clarify-query-rules-docs 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.1 v8.11.0 v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants