Skip to content

Commit

Permalink
doc: Added note on compound Ids
Browse files Browse the repository at this point in the history
  • Loading branch information
tazarov committed Dec 28, 2023
1 parent cfc9124 commit 468b8c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/core/document-ids.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Chroma is unopinionated about document IDs and delegates those decisions to the user. This frees users to build semantics around their IDs.

## Note on Compound IDs

While you can choose to use IDs that are composed of multiple sub-IDs (e.g. `user_id` + `document_id`), it is important to highlight that Chroma does not support querying by partial ID.

## Common Practices

### UUIDs
Expand Down Expand Up @@ -80,4 +84,4 @@ collection.add(ids=[generate_sha256_hash_from_text(documents[i]) for i in range(
In this section we'll explore a few different use cases for building semantics around document IDs.

- URL Slugs - if your docs are web pages with permalinks (e.g. blog posts), you can use the URL slug as the document ID.
- File Paths - if your docs are files on disk, you can use the file path as the document ID.
- File Paths - if your docs are files on disk, you can use the file path as the document ID.

0 comments on commit 468b8c7

Please sign in to comment.