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

[DOCS] Add snippet tests to retriever API docs #113289

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

leemthompo
Copy link
Contributor

We can't test the elser + semantic reranking one, so have to omit those.

Copy link
Contributor

Documentation preview:

@leemthompo leemthompo marked this pull request as ready for review September 20, 2024 17:03
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Sep 20, 2024
@leemthompo leemthompo added Team:Docs Meta label for docs team v8.15.0 v8.16.0 auto-backport-and-merge Automatically create backport pull requests and merge when ready >docs General docs changes labels Sep 20, 2024
@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Sep 20, 2024
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Member

@kderusso kderusso left a comment

Choose a reason for hiding this comment

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

Thanks so much for adding tests!!! 🎉 That's great to see.

I've added one comment, then ready to approve.

{"index":{}}
{"region": "Austria", "year": "2020"}

PUT /my-embeddings
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: It might be nicer to have a single index restaurants with the combined keyword and vector fields. This would make the examples a bit cleaner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally! I'll update :cat_frantically_typing:

----
GET /restaurants/_search
GET /restaurants,my-embeddings/_search
Copy link
Member

Choose a reason for hiding this comment

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

This goes back to my nitpick in tests, I'd like to see us continue to query a single index or alias in this example

@@ -316,7 +367,7 @@ GET movies/_search
}
}
----
// NOTCONSOLE
// TEST[skip:uses ELSER]
Copy link
Member

Choose a reason for hiding this comment

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

👍 Nice comment explanations

Copy link
Member

@kderusso kderusso left a comment

Choose a reason for hiding this comment

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

Thanks for iterating - and adding these tests!!

@leemthompo leemthompo merged commit 5750696 into elastic:main Sep 23, 2024
5 checks passed
leemthompo added a commit to leemthompo/elasticsearch that referenced this pull request Sep 23, 2024
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.15
8.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport-and-merge Automatically create backport pull requests and merge when ready >docs General docs changes Team:Docs Meta label for docs team v8.15.0 v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants