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

DOCSP-48164: Async examples for Indexes page #235

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

mcmorisi
Copy link
Collaborator

@mcmorisi mcmorisi commented Mar 20, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-48164

Staging Links

  • indexes
  • Self-Review Checklist

    • Is this free of any warnings or errors in the RST?
    • Did you run a spell-check?
    • Did you run a grammar-check?

    Copy link

    netlify bot commented Mar 20, 2025

    Deploy Preview for docs-pymongo ready!

    Name Link
    🔨 Latest commit 6734258
    🔍 Latest deploy log https://app.netlify.com/sites/docs-pymongo/deploys/67e16b4249e522000816eda5
    😎 Deploy Preview https://deploy-preview-235--docs-pymongo.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    Copy link
    Collaborator

    @mongoKart mongoKart left a comment

    Choose a reason for hiding this comment

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

    LGTM

    # end-create-search-indexes

    # start-list-search-indexes
    results = await collection.list_search_indexes().to_list()

    Choose a reason for hiding this comment

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

    Suggested change
    results = await collection.list_search_indexes().to_list()
    results = await (await collection.list_search_indexes()).to_list()

    to_list() is also a coroutine, so we need to await it after we've awaited the list_search_indexes() call.

    @mcmorisi mcmorisi requested a review from NoahStapp March 24, 2025 14:25
    @mcmorisi mcmorisi merged commit 0b4adeb into mongodb:master Mar 24, 2025
    5 of 6 checks passed
    @mcmorisi mcmorisi deleted the DOCSP-48164-async-indexes branch March 24, 2025 14:59
    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