From fb856005a902cdd5ce45827355c35f4e02f29be2 Mon Sep 17 00:00:00 2001 From: BubbleCal Date: Mon, 29 Sep 2025 18:24:58 +0800 Subject: [PATCH] update docs Signed-off-by: BubbleCal --- docs/src/js/classes/Index.md | 31 +++++++++++++++++++++++ docs/src/js/classes/MergeInsertBuilder.md | 24 ++++++++++++++++++ docs/src/js/globals.md | 1 + 3 files changed, 56 insertions(+) diff --git a/docs/src/js/classes/Index.md b/docs/src/js/classes/Index.md index 0ec245b2..372a1ac4 100644 --- a/docs/src/js/classes/Index.md +++ b/docs/src/js/classes/Index.md @@ -194,6 +194,37 @@ currently is also a memory intensive operation. *** +### ivfRq() + +```ts +static ivfRq(options?): Index +``` + +Create an IvfRq index + +IVF-RQ (RabitQ Quantization) compresses vectors using RabitQ quantization +and organizes them into IVF partitions. + +The compression scheme is called RabitQ quantization. Each dimension is quantized into a small number of bits. +The parameters `num_bits` and `num_partitions` control this process, providing a tradeoff +between index size (and thus search speed) and index accuracy. + +The partitioning process is called IVF and the `num_partitions` parameter controls how +many groups to create. + +Note that training an IVF RQ index on a large dataset is a slow operation and +currently is also a memory intensive operation. + +#### Parameters + +* **options?**: `Partial`<[`IvfRqOptions`](../interfaces/IvfRqOptions.md)> + +#### Returns + +[`Index`](Index.md) + +*** + ### labelList() ```ts diff --git a/docs/src/js/classes/MergeInsertBuilder.md b/docs/src/js/classes/MergeInsertBuilder.md index 09664e62..ae601c9e 100644 --- a/docs/src/js/classes/MergeInsertBuilder.md +++ b/docs/src/js/classes/MergeInsertBuilder.md @@ -52,6 +52,30 @@ the merge result *** +### useIndex() + +```ts +useIndex(useIndex): MergeInsertBuilder +``` + +Controls whether to use indexes for the merge operation. + +When set to `true` (the default), the operation will use an index if available +on the join key for improved performance. When set to `false`, it forces a full +table scan even if an index exists. This can be useful for benchmarking or when +the query optimizer chooses a suboptimal path. + +#### Parameters + +* **useIndex**: `boolean` + Whether to use indices for the merge operation. Defaults to `true`. + +#### Returns + +[`MergeInsertBuilder`](MergeInsertBuilder.md) + +*** + ### whenMatchedUpdateAll() ```ts diff --git a/docs/src/js/globals.md b/docs/src/js/globals.md index 3f38cb4c..757e47e9 100644 --- a/docs/src/js/globals.md +++ b/docs/src/js/globals.md @@ -68,6 +68,7 @@ - [IndexStatistics](interfaces/IndexStatistics.md) - [IvfFlatOptions](interfaces/IvfFlatOptions.md) - [IvfPqOptions](interfaces/IvfPqOptions.md) +- [IvfRqOptions](interfaces/IvfRqOptions.md) - [MergeResult](interfaces/MergeResult.md) - [OpenTableOptions](interfaces/OpenTableOptions.md) - [OptimizeOptions](interfaces/OptimizeOptions.md)