Skip to content

Commit

Permalink
Clean up docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
aulorbe committed Jul 8, 2024
1 parent a99a56f commit 75713e5
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions pinecone/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,21 +273,23 @@ func (c *Client) DeleteIndex(ctx context.Context, idxName string) error {
return nil
}

// ConfigureIndex is used to [scale a pods-based index] up or down by changing the size of pods or the number of
// ConfigureIndex is used to [scale a pods-based index] up or down by changing the size of the pods or the number of
//replicas.
//
// Parameters:
// - name: The name of the index to configure.
// - pods: The size of pods to scale the index to (e.g. for a "p1" pod type, you could pass "p1.x2", "p1.x4",
// "p1.x6", etc. Optional.
// - replicas: The number of replicas to scale the index to. Optional.
// This is capped by the maximum number of replicas allowed in your Pinecone project. To configure this number,
// go to app.pinecone.io, select your project, and configure the maximum number of pods.
// - name: The name of the index to configure.
// - pods: (Optional) The pod size to scale the index to (e.g. for a "p1" pod type,
// you could pass "p1.x2" to scale your index to the "x2" size,
// or you could pass "p1.x4" to scale your index to the "x4" size, and
// so forth.
// - replicas: (Optional) The number of replicas to scale the index to.
// This is capped by the maximum number of replicas allowed in your Pinecone project. To configure this number,
// go to [app.pinecone.io], select your project, and configure the maximum number of pods.
//
// Note: You can only scale an index up, not down. If you want to scale an index down,
// you must create a new index with the desired configuration.
// you must create a new index with the desired configuration.
//
// It returns a ConfigureIndexResponse object, which contains the new configuration of the index, or an error.
// Returns a ConfigureIndexResponse object, which contains the new configuration of the index, or an error.
//
// Example for a pods-based index originally configured with 1 "p1" pod of size "x2" and 1 replica:
// // To scale the size of your pods from "x2" to "x4":
Expand All @@ -309,6 +311,7 @@ func (c *Client) DeleteIndex(ctx context.Context, idxName string) error {
// }
//
// [scale a pods-based index]: https://docs.pinecone.io/guides/indexes/configure-pod-based-indexes
// [app.pinecone.io]: https://app.pinecone.io
func (c *Client) ConfigureIndex(ctx context.Context, name string, pods *string,
replicas *int32) (*control.ConfigureIndexResponse,
error) {
Expand Down

0 comments on commit 75713e5

Please sign in to comment.