Skip to content

Commit

Permalink
Small fix in deleteAll documentation regardning namespaces (#314)
Browse files Browse the repository at this point in the history
## Problem

Describe the purpose of this change. What problem is being solved and
why?
Was confusing when I read the commented documentation.

## Solution

[Describe the approach you took. Link to any relevant bugs, issues,
docs, or other
resources.](https://docs.pinecone.io/guides/data/delete-data#delete-all-records-from-a-namespace)
Change documentation to represent to default namespace being deleted.

## Type of Change

- [ ] Non-code change (docs, etc)


## Test Plan

Describe specific steps for validating this change.

---------

Co-authored-by: Audrey Sage Lorberfeld <[email protected]>
  • Loading branch information
kehanzhang and aulorbe authored Dec 19, 2024
1 parent b6855c8 commit 4516c53
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ export class Index<T extends RecordMetadata = RecordMetadata> {
*
* await index.deleteAll();
*
* // Records from namespace 'foo' are now deleted. Records in other namespaces are not modified.
* // Records from the default namespace '' are now deleted. Records in other namespaces are not modified.
*
* await index.describeIndexStats();
* // {
* // namespaces: {
Expand All @@ -278,10 +279,6 @@ export class Index<T extends RecordMetadata = RecordMetadata> {
* // indexFullness: 0,
* // totalRecordCount: 1
* // }
*
* await index.deleteAll();
* // Since no namespace was specified, records in default namespace '' are now deleted.
*
* ```
* @throws {@link Errors.PineconeConnectionError} when network problems or an outage of Pinecone's APIs prevent the request from being completed.
* @returns A promise that resolves when the delete is completed.
Expand Down

0 comments on commit 4516c53

Please sign in to comment.