Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add and update Godoc internal links
  • Loading branch information
philippgille committed Sep 1, 2024
commit 98326366da19e650f6574a6e950347b897e09b97
2 changes: 1 addition & 1 deletion collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ func (c *Collection) Query(ctx context.Context, queryText string, nResults int,

// QueryWithOptions performs an exhaustive nearest neighbor search on the collection.
//
// - options: The options for the query. See QueryOptions for more information.
// - options: The options for the query. See [QueryOptions] for more information.
func (c *Collection) QueryWithOptions(ctx context.Context, options QueryOptions) ([]Result, error) {
if options.QueryText == "" && len(options.QueryEmbedding) == 0 {
return nil, errors.New("QueryText and QueryEmbedding options are empty")
Expand Down
7 changes: 4 additions & 3 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ func NewDB() *DB {
// will make this configurable (encoding, async writes, WAL-based writes, etc.).
//
// In addition to persistence for each added collection and document you can use
// [DB.Export] and [DB.Import] to export and import the entire DB to/from a file,
// which also works for the pure in-memory DB.
// [DB.ExportToFile] / [DB.ExportToWriter] and [DB.ImportFromFile] /
// [DB.ImportFromReader] to export and import the entire DB to/from a file or
// writer/reader, which also works for the pure in-memory DB.
func NewPersistentDB(path string, compress bool) (*DB, error) {
if path == "" {
path = "./chromem-go"
Expand Down Expand Up @@ -509,7 +510,7 @@ func (db *DB) CreateCollection(name string, metadata map[string]string, embeddin
// ListCollections returns all collections in the DB, mapping name->Collection.
// The returned map is a copy of the internal map, so it's safe to directly modify
// the map itself. Direct modifications of the map won't reflect on the DB's map.
// To do that use the DB's methods like CreateCollection() and DeleteCollection().
// To do that use the DB's methods like [DB.CreateCollection] and [DB.DeleteCollection].
// The map is not an entirely deep clone, so the collections themselves are still
// the original ones. Any methods on the collections like Add() for adding documents
// will be reflected on the DB's collections and are concurrency-safe.
Expand Down