Skip to content

Commit abdd43f

Browse files
authored
Update API.md
1 parent c7cbc58 commit abdd43f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

API.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ SELECT vector_init('documents', 'embedding', 'dimension=384,type=FLOAT32,distanc
9797
Performs quantization on the specified table and column. This precomputes internal data structures to support fast approximate nearest neighbor (ANN) search.
9898
Read more about quantization [here](https://github.com/sqliteai/sqlite-vector/blob/main/QUANTIZATION.md).
9999

100+
If a quantization already exists for the specified table and column, it is replaced. If it was previously loaded into memory using `vector_quantize_preload`, the data is automatically reloaded.
101+
100102
**Parameters:**
101103

102104
* `table` (TEXT): Name of the table.
@@ -153,7 +155,10 @@ SELECT vector_quantize_preload('documents', 'embedding');
153155
**Returns:** `NULL`
154156

155157
**Description:**
156-
Cleans up internal structures related to a previously quantized table/column. Use this if data has changed or quantization is no longer needed.
158+
Releases memory previously allocated by a vector_quantize_preload call and removes all quantization entries associated with the specified table and column.
159+
Use this function when the underlying data has changed or when quantization is no longer required. In some cases, running VACUUM may be necessary to reclaim the freed space from the database.
160+
161+
This function should only be called when quantization is no longer needed. If the data changes and you invoke vector_quantize, the old quantization data is automatically replaced.
157162

158163
**Example:**
159164

0 commit comments

Comments
 (0)