KUBE-169: Simplify shared MongoDB Search query snippets#1378
Open
anandsyncs wants to merge 3 commits into
Open
KUBE-169: Simplify shared MongoDB Search query snippets#1378anandsyncs wants to merge 3 commits into
anandsyncs wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
MCK 1.10.0 Release NotesNew Features
Bug Fixes
|
This was referenced Jul 15, 2026
viveksinghggits
left a comment
Collaborator
There was a problem hiding this comment.
Looks pretty good, left small comments.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
viveksinghggits
approved these changes
Jul 16, 2026
There was a problem hiding this comment.
Pull request overview
This PR simplifies the shared MongoDB Search query-usage snippet modules (replica set + sharded) by separating CI-only readiness behavior from customer-facing steps and by making the “wait” step a public index-status inspection rather than a fixed sleep.
Changes:
- Updates the sharded query-usage harness to run an internal readiness poll and then a public
getSearchIndexes()status check. - Refactors query snippets to execute
mongoshdirectly viakubectl execheredocs (removing the intermediate “write JS to /tmp” pattern). - Adds/updates READMEs to make scenario handoff and quick-run instructions clearer for single- and multi-cluster flows.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/search/08-search-sharded-query-usage/test.sh | Switches from the old internal wait to a new internal wait + public index listing before queries. |
| docs/search/08-search-sharded-query-usage/README.md | Rewrites sharded query-usage instructions and documents multi-cluster handoff. |
| docs/search/08-search-sharded-query-usage/code_snippets/08_0455_execute_vector_search_query.sh | Runs vector search via inline kubectl exec … mongosh heredoc and simplifies query vector selection. |
| docs/search/08-search-sharded-query-usage/code_snippets/08_0450_execute_search_query.sh | Runs text search via inline kubectl exec … mongosh heredoc. |
| docs/search/08-search-sharded-query-usage/code_snippets/08_0440_list_search_indexes.sh | New public snippet to list/inspect index status for both collections. |
| docs/search/08-search-sharded-query-usage/code_snippets/08_0440_internal_wait_for_search_indexes.sh | Removes the prior internal polling implementation. |
| docs/search/08-search-sharded-query-usage/code_snippets/08_0439_internal_wait_for_search_indexes.sh | New internal polling snippet using getSearchIndexes() to wait for READY. |
| docs/search/03-search-query-usage/test.sh | Adds internal readiness polling and gates auto-embed listing based on EMBEDDING_MODEL. |
| docs/search/03-search-query-usage/README.md | New replica-set query-usage README with handoff and quick-run guidance (incl. multi-cluster). |
| docs/search/03-search-query-usage/code_snippets/03_0456_execute_auto_embed_vector_search_query.sh | Switches to inline kubectl exec … mongosh heredoc execution. |
| docs/search/03-search-query-usage/code_snippets/03_0455_execute_vector_search_query.sh | Switches to dynamic query vector selection (instead of a large inline literal) and updates projection/limits. |
| docs/search/03-search-query-usage/code_snippets/03_0450_execute_search_query.sh | Switches to inline kubectl exec … mongosh heredoc execution. |
| docs/search/03-search-query-usage/code_snippets/03_0440_wait_for_search_index_ready.sh | Replaces a fixed sleep with a public getSearchIndexes() status printout. |
| docs/search/03-search-query-usage/code_snippets/03_0439_internal_wait_for_search_indexes.sh | New internal polling snippet to wait for relevant indexes to reach READY (incl. optional auto-embed). |
| docs/search/03-search-query-usage/code_snippets/03_0420_import_movies_mflix_database.sh | Splits the import into explicit curl + mongorestore execs (no temp script). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Simplifies the shared replica-set and sharded MongoDB Search query snippets while keeping public commands customer-friendly.
Jira: KUBE-169
Stack: 1/3. Followed by the replica-set and sharded multi-cluster Search snippet PRs.
Extracted from #1368.
Evergreen proof
Full-stack Search snippets patch passed all nine Search snippet tasks: seven single-cluster and two multi-cluster.