pinecone-io / pinecone-python-client

The Pinecone Python client
https://www.pinecone.io/docs
Apache License 2.0
309 stars 81 forks source link

Add has_index() #385

Closed rohanshah18 closed 3 months ago

rohanshah18 commented 3 months ago

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

Test Plan

Added integration tests.