Skip to content

PYTHON-6296 Ensure that not specifying the name and type when creating a search index will result in the name being "default" and the type being "search" - #3254

Open
blink1073 wants to merge 1 commit into
mongodb:mainfrom
blink1073:DRIVERS-3345
Open

blink1073 wants to merge 1 commit into
mongodb:mainfrom
blink1073:DRIVERS-3345

Conversation

@blink1073

@blink1073 blink1073 commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

PYTHON-6296

Changes in this PR

Adds the search index prose test from mongodb/specifications#1861, which asserts that creating a search index without a name or type yields the server defaults, name "default" and type "search".

  • Adds TestSearchIndexProse.test_case_9 to the async index management tests and to the sync copy generated by just synchro.
  • Requires no driver code changes.

Test Plan

  • The test-search-index-helpers Evergreen task runs the search index tests on an Atlas Search cluster in both suites. It passed with this patch applied (task logs).
  • just typing and just lint-manual pass.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)? (Test-only change.)
  • Is there test coverage?
  • Is any followup work tracked in a JIRA ticket? If so, add link(s). (No followup work needed.)

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

@blink1073 blink1073 changed the title DRIVERS-3345 Ensure that not specifying the name and type when creating a search index will result in the name being "default" and the type being "search" PYTHON-6296 Ensure that not specifying the name and type when creating a search index will result in the name being "default" and the type being "search" Nov 25, 2026
@blink1073
blink1073 requested a balanced review from Copilot November 25, 2026 12:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues with the added regression coverage for default search index names and types.

No open issues 🎉

What changed in this PR

Adds regression coverage for server-default search index names and types, implementing the prose test from mongodb/specifications#1861 without changing driver code.

Changes:

  • Adds an async test that creates a search index without specifying its name or type.
  • Verifies the returned name is "default" and, once the index is queryable, its type is "search".
  • Includes the generated synchronous equivalent and index cleanup.
File Description
test/​test_index_management.py Generated synchronous test for search index defaults.
test/​asynchronous/​test_index_management.py Async prose test verifying default index name and type.

Review effort: Balanced

@blink1073
blink1073 marked this pull request as ready for review November 25, 2026 12:38
@blink1073
blink1073 requested a review from a team as a code owner November 25, 2026 12:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants