Skip to content

Conversation

@rohanshah18
Copy link
Contributor

@rohanshah18 rohanshah18 commented Aug 16, 2024

Problem

Currently, users can not easily check if an index exists or not. The .names() iterator on the list_indexes response object is not super discoverable.

Solution

Add has_index() which internally calls describe_index() and returns true if the index exists, false otherwise.

Type of Change

  • New feature (non-breaking change which adds functionality)

Test Plan

Added integration tests.


@rohanshah18 rohanshah18 requested a review from jhamon August 16, 2024 20:09
Copy link
Collaborator

@jhamon jhamon left a comment

Choose a reason for hiding this comment

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

I left some feedback to fix, but overall great job putting together your first PR in python :)

Copy link
Collaborator

@jhamon jhamon left a comment

Choose a reason for hiding this comment

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

Looks great! 🚢

@rohanshah18 rohanshah18 merged commit 1d0b686 into main Aug 28, 2024
@rohanshah18 rohanshah18 deleted the rshah/hasIndex branch August 28, 2024 16:22
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