Skip to content

Commit 407168d

Browse files
authored
1.1.0 (#165)
Signed-off-by: usamoi <usamoi@outlook.com>
1 parent d89d814 commit 407168d

File tree

14 files changed

+454
-37
lines changed

14 files changed

+454
-37
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: lycheeverse/lychee-action@v2
2424
with:
2525
# exclude the blog since runner IPs are almost always blocked by HashNode
26-
args: --max-concurrency 8 --verbose --no-progress --exclude '^https://blog\.vectorchord\.ai' .
26+
args: --max-concurrency 8 --verbose --no-progress .
2727
fail: true
2828
format: markdown
2929
jobSummary: true

.vitepress/config.mts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,11 @@ export default defineConfig({
200200
{ text: 'Indexing', link: '/vectorchord/usage/indexing' },
201201
{ text: 'Multi-Vector Retrieval', link: '/vectorchord/usage/indexing-with-maxsim-operators' },
202202
{ text: 'Graph Index', link: '/vectorchord/usage/graph-index' },
203+
{ text: 'Quantization Types', link: '/vectorchord/usage/quantization-types' },
203204
{ text: 'Similarity Filter', link: '/vectorchord/usage/range-query' },
204205
{ text: 'PostgreSQL Tuning', link: '/vectorchord/usage/performance-tuning' },
205206
{ text: 'Monitoring', link: '/vectorchord/usage/monitoring' },
207+
{ text: 'Fallback Parameters', link: '/vectorchord/usage/fallback-parameters' },
206208
{ text: 'Measure Recall', link: '/vectorchord/usage/measure-recall' },
207209
{ text: 'Prewarm', link: '/vectorchord/usage/prewarm' },
208210
{ text: 'Prefilter', link: '/vectorchord/usage/prefilter' },

lychee.toml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
fallback_extensions = ["md"]
22
user_agent = "curl/8.1.2"
33
include_fragments = true
4-
accept = [
5-
200,
6-
403, # forbidden, mainly for OpenAI
7-
429, # Terraform
8-
999, # LinkedIn
4+
accept = [200, 429]
5+
exclude = [
6+
# HTTP 403
7+
"^https://techcommunity\\.microsoft\\.com/blog/adforpostgresql/introducing-the-graphrag-solution-for-azure-database-for-postgresql/4299871$",
8+
"^https://www\\.usenix.org/conference/osdi23/presentation/zhang-qianxi$",
9+
# HTTP 406
10+
"^https://modal\\.com/docs/guide/volumes$",
11+
# HTTP 999
12+
"^https://www\\.linkedin\\.com/in/tom-ingold/$",
13+
# Timeout
14+
"^https://www\\.freedesktop\\.org/software/systemd/man/latest/systemd\\.exec\\.html#Process%20Properties$",
915
]
1016
root_dir = "src"
1117
remap = [

src/vectorchord/admin/kubernetes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ tensorchord=> \dx
151151
Name | Version | Schema | Description
152152
---------+---------+------------+---------------------------------------------------------------------------------------------
153153
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
154-
vchord | 1.0.0 | public | vchord: Vector database plugin for Postgres, written in Rust, specifically designed for LLM
154+
vchord | 1.1.0 | public | vchord: Vector database plugin for Postgres, written in Rust, specifically designed for LLM
155155
vector | 0.8.1 | public | vector data type and ivfflat and hnsw access methods
156156
(3 rows)
157157
```
@@ -216,7 +216,7 @@ spec:
216216
extensions:
217217
- name: vchord
218218
image:
219-
reference: ghcr.io/tensorchord/vchord-scratch:pg18-v1.0.0
219+
reference: ghcr.io/tensorchord/vchord-scratch:pg18-v1.1.0
220220
dynamic_library_path:
221221
- /usr/lib/postgresql/18/lib/
222222
extension_control_path:
@@ -243,7 +243,7 @@ tensorchord=> \dx
243243
Name | Version | Schema | Description
244244
---------+---------+------------+---------------------------------------------------------------------------------------------
245245
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
246-
vchord | 1.0.0 | public | vchord: Vector database plugin for Postgres, written in Rust, specifically designed for LLM
246+
vchord | 1.1.0 | public | vchord: Vector database plugin for Postgres, written in Rust, specifically designed for LLM
247247
vector | 0.8.1 | public | vector data type and ivfflat and hnsw access methods
248248
(3 rows)
249249

src/vectorchord/getting-started/installation.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ docker run \
2828
--name vchord-demo \
2929
-e POSTGRES_PASSWORD=mysecretpassword \
3030
-p 5432:5432 \
31-
-d tensorchord/vchord-postgres:pg18-v1.0.0
31+
-d tensorchord/vchord-postgres:pg18-v1.1.0
3232
```
3333

3434
2. Connect to the database using the `psql` command line tool. The default username is `postgres`.
@@ -81,7 +81,7 @@ Other sections may align with the above.
8181
We provide a scratch image that contains only the files of VectorChord. You can install VectorChord in any image using Docker's `COPY`, like
8282

8383
```dockerfile
84-
FROM tensorchord/vchord-scratch:pg18-v1.0.0 AS vchord_scratch
84+
FROM tensorchord/vchord-scratch:pg18-v1.1.0 AS vchord_scratch
8585
FROM postgres:18-bookworm
8686
RUN apt-get update && apt-get install -y postgresql-18-pgvector
8787
COPY --from=vchord_scratch / /
@@ -118,8 +118,8 @@ If you have not installed PostgreSQL yet, please install PostgreSQL. If you have
118118
1. Download the source code, build and install it with `make`.
119119

120120
```sh
121-
curl -fsSL https://github.com/tensorchord/VectorChord/archive/refs/tags/1.0.0.tar.gz | tar -xz
122-
cd VectorChord-1.0.0
121+
curl -fsSL https://github.com/tensorchord/VectorChord/archive/refs/tags/1.1.0.tar.gz | tar -xz
122+
cd VectorChord-1.1.0
123123
make build
124124
make install # or `sudo make install`
125125
```
@@ -161,7 +161,7 @@ Please note that binaries generated with a specific `target-cpu` are not compati
161161
You can also do it by using Cargo's configuration.
162162

163163
```sh
164-
cd VectorChord-1.0.0
164+
cd VectorChord-1.1.0
165165
mkdir -p .cargo
166166
touch .cargo/config.toml
167167
echo 'build.rustflags = ["-Ctarget-cpu=icelake"]' >> ./cargo/config.toml
@@ -174,8 +174,8 @@ If you have not installed PostgreSQL yet, please install PostgreSQL following ht
174174
1. Download Debian packages in [the release page](https://github.com/tensorchord/VectorChord/releases/latest), and install them by `apt`.
175175

176176
```sh
177-
wget https://github.com/tensorchord/VectorChord/releases/download/1.0.0/postgresql-18-vchord_1.0.0-1_$(dpkg --print-architecture).deb
178-
sudo apt install ./postgresql-18-vchord_1.0.0-1_$(dpkg --print-architecture).deb
177+
wget https://github.com/tensorchord/VectorChord/releases/download/1.1.0/postgresql-18-vchord_1.1.0-1_$(dpkg --print-architecture).deb
178+
sudo apt install ./postgresql-18-vchord_1.1.0-1_$(dpkg --print-architecture).deb
179179
```
180180

181181
2. Configure your PostgreSQL by modifying the `shared_preload_libraries` to include the extension. And then restart the PostgreSQL cluster.
@@ -198,8 +198,8 @@ If you have not installed PostgreSQL yet, please install PostgreSQL following ht
198198
1. Download Debian packages in [the release page](https://github.com/tensorchord/VectorChord/releases/latest), and install them by `apt`.
199199

200200
```sh
201-
wget https://github.com/tensorchord/VectorChord/releases/download/1.0.0/postgresql-18-vchord_1.0.0-1_$(dpkg --print-architecture).deb
202-
sudo apt install ./postgresql-18-vchord_1.0.0-1_$(dpkg --print-architecture).deb
201+
wget https://github.com/tensorchord/VectorChord/releases/download/1.1.0/postgresql-18-vchord_1.1.0-1_$(dpkg --print-architecture).deb
202+
sudo apt install ./postgresql-18-vchord_1.1.0-1_$(dpkg --print-architecture).deb
203203
```
204204

205205
2. Configure your PostgreSQL by modifying the `shared_preload_libraries` to include the extension. And then restart the PostgreSQL cluster.

src/vectorchord/getting-started/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ docker run \
3737
--name vectorchord-demo \
3838
-e POSTGRES_PASSWORD=mysecretpassword \
3939
-p 5432:5432 \
40-
-d tensorchord/vchord-postgres:pg18-v1.0.0
40+
-d tensorchord/vchord-postgres:pg18-v1.1.0
4141
```
4242
> In addition to the base image with the VectorChord extension, we provide an all-in-one image, `tensorchord/vchord-suite:pg18-latest`. This comprehensive image includes all official TensorChord extensions. Developers should select an image tag that is compatible with their extension's version, as indicated in [the support matrix](https://github.com/tensorchord/VectorChord-images?tab=readme-ov-file#support-matrix).
4343
@@ -79,9 +79,11 @@ For more usage, please read:
7979
- [Indexing](/vectorchord/usage/indexing)
8080
- [Multi-Vector Retrieval](/vectorchord/usage/indexing-with-maxsim-operators)
8181
- [Graph Index](/vectorchord/usage/graph-index)
82+
- [Quantization Types](/vectorchord/usage/quantization-types)
8283
- [Similarity Filter](/vectorchord/usage/range-query)
8384
- [PostgreSQL Tuning](/vectorchord/usage/performance-tuning)
8485
- [Monitoring](/vectorchord/usage/monitoring)
86+
- [Fallback Parameters](/vectorchord/usage/fallback-parameters)
8587
- [Measure Recall](/vectorchord/usage/measure-recall)
8688
- [Prewarm](/vectorchord/usage/prewarm)
8789
- [Prefilter](/vectorchord/usage/prefilter)

src/vectorchord/getting-started/vectorchord-suite.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ CREATE EXTENSION IF NOT EXISTS pg_tokenizer CASCADE;
5757
CREATE EXTENSION IF NOT EXISTS vchord_bm25 CASCADE;
5858
\dx
5959
pg_tokenizer | 0.1.1 | tokenizer_catalog | pg_tokenizer
60-
vchord | 1.0.0 | public | vchord: Vector database plugin for Postgres, written in Rust, specifically designed for LLM
61-
vchord_bm25 | 0.2.2 | bm25_catalog | vchord_bm25: A postgresql extension for bm25 ranking algorithm
60+
vchord | 1.1.0 | public | vchord: Vector database plugin for Postgres, written in Rust, specifically designed for LLM
61+
vchord_bm25 | 0.3.0 | bm25_catalog | vchord_bm25: A postgresql extension for bm25 ranking algorithm
6262
vector | 0.8.1 | public | vector data type and ivfflat and hnsw access methods
6363
```
6464

src/vectorchord/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
- [Indexing](/vectorchord/usage/indexing)
1212
- [Multi-Vector Retrieval](/vectorchord/usage/indexing-with-maxsim-operators)
1313
- [Graph Index](/vectorchord/usage/graph-index)
14+
- [Quantization Types](/vectorchord/usage/quantization-types)
1415
- [Similarity Filter](/vectorchord/usage/range-query)
1516
- [PostgreSQL Tuning](/vectorchord/usage/performance-tuning)
1617
- [Monitoring](/vectorchord/usage/monitoring)
18+
- [Fallback Parameters](/vectorchord/usage/fallback-parameters)
1719
- [Measure Recall](/vectorchord/usage/measure-recall)
1820
- [Prewarm](/vectorchord/usage/prewarm)
1921
- [Prefilter](/vectorchord/usage/prefilter)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Fallback Parameters <badge type="tip" text="since v1.1.0" />
2+
3+
Search parameters are typically configured via GUCs. VectorChord also offers an alternative method, allowing these parameters to be attached directly to an index instead of a session or transaction. In other words, you can store them as part of the index's storage parameters.
4+
5+
You could set `probes` at index building using the following syntax.
6+
7+
```sql
8+
CREATE INDEX items_embedding_idx ON items USING vchordrq (embedding vector_l2_ops) WITH (options = $$
9+
build.internal.lists = [1000]
10+
$$, probes = '10');
11+
```
12+
13+
You can now perform searches without setting GUCs:
14+
15+
```sql
16+
--- probes = '10'
17+
SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;
18+
```
19+
20+
If the index is already built, you can set `probes` like this:
21+
22+
```sql
23+
ALTER INDEX items_embedding_idx SET (probes = '100');
24+
```
25+
26+
You can still set GUCs for search parameters. When you do so, the GUCs take precedence over the index storage parameters. This allows you to temporarily override these settings for the current session or transaction without locking the index.
27+
28+
```sql
29+
SET vchordrq.probes TO '100';
30+
--- probes = '100'
31+
SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;
32+
```
33+
34+
This syntax is useful in the following situations:
35+
36+
* When there are multiple indexes.
37+
* When you prefer not to set GUCs.
38+
* When you want to configure search parameters offline.
39+
40+
As long as GUCs are set, even at the system level or database level, they will override the index settings. So, to avoid hard-to-detect issues, we recommend using only one method to set search parameters, either via GUCs or via index storage parameters.
41+
42+
Not all parameters support this feature. See [Reference](#reference) for all supported parameters.
43+
44+
## Reference {#reference}
45+
46+
### Index Storage Parameters <badge type="info" text="vchordrq" />
47+
48+
#### `probes` <badge type="tip" text="since v1.1.0" />
49+
50+
- Description: Fallback value of [`vchordrq.probes`](indexing#search-parameters-vchordrq-probes).
51+
- Type: list of integers
52+
- Default: ` `
53+
54+
#### `epsilon` <badge type="tip" text="since v1.1.0" />
55+
56+
- Description: Fallback value of [`vchordrq.epsilon`](indexing#search-parameters-vchordrq-epsilon).
57+
- Type: real
58+
- Default: `1.9`
59+
- Domain: `[0.0, 4.0]`
60+
61+
#### `maxsim_refine` <badge type="tip" text="since v1.1.0" />
62+
63+
- Description: Fallback value of [`vchordrq.maxsim_refine`](indexing-with-maxsim-operators#search-parameters-vchordrq-maxsim-refine).
64+
- Type: integer
65+
- Default: `0`
66+
- Domain: `[0, 2147483647]`
67+
68+
#### `maxsim_threshold` <badge type="tip" text="since v1.1.0" />
69+
70+
- Description: Fallback value of [`vchordrq.maxsim_threshold`](indexing-with-maxsim-operators#search-parameters-vchordrq-maxsim-threshold).
71+
- Type: integer
72+
- Default: `0`
73+
- Domain: `[0, 2147483647]`
74+
75+
### Index Storage Parameters <badge type="info" text="vchordg" />
76+
77+
#### `ef_search` <badge type="tip" text="since v1.1.0" />
78+
79+
- Description: Fallback value of [`vchordg.ef_search`](graph-index#search-parameters-vchordg-ef-search).
80+
- Type: integer
81+
- Default: `64`
82+
- Domain: `[1, 65535]`

src/vectorchord/usage/graph-index.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,18 @@ The following table lists all available operator classes supported by `vchordg`.
5656
| `halfvec_l2_ops` | index works for `halfvec` type and Euclidean distance | `<->(halfvec,halfvec)` | `<<->>(halfvec,halfvec)` |
5757
| `halfvec_ip_ops` | index works for `halfvec` type and negative inner product | `<#>(halfvec,halfvec)` | `<<#>>(halfvec,halfvec)` |
5858
| `halfvec_cosine_ops` | index works for `halfvec` type and cosine distance | `<=>(halfvec,halfvec)` | `<<=>>(halfvec,halfvec)` |
59+
| `rabitq8_l2_ops` | index works for `rabitq8` type and Euclidean distance | `<->(rabitq8,rabitq8)` | `<<->>(rabitq8,rabitq8)` |
60+
| `rabitq8_ip_ops` | index works for `rabitq8` type and negative inner product | `<#>(rabitq8,rabitq8)` | `<<#>>(rabitq8,rabitq8)` |
61+
| `rabitq8_cosine_ops` | index works for `rabitq8` type and cosine distance | `<=>(rabitq8,rabitq8)` | `<<=>>(rabitq8,rabitq8)` |
62+
| `rabitq4_l2_ops` | index works for `rabitq4` type and Euclidean distance | `<->(rabitq4,rabitq4)` | `<<->>(rabitq4,rabitq4)` |
63+
| `rabitq4_ip_ops` | index works for `rabitq4` type and negative inner product | `<#>(rabitq4,rabitq4)` | `<<#>>(rabitq4,rabitq4)` |
64+
| `rabitq4_cosine_ops` | index works for `rabitq4` type and cosine distance | `<=>(rabitq4,rabitq4)` | `<<=>>(rabitq4,rabitq4)` |
5965

60-
`<<->>`, `<<#>>`, `<<=>>` are operators defined by VectorChord.
66+
`<<->>`, `<<#>>`, `<<=>>` are operators defined by VectorChord. For more information about `<<->>`, `<<#>>`, `<<=>>`, refer to [Similarity Filter](range-query).
6167

62-
For more information about `<<->>`, `<<#>>`, `<<=>>`, refer to [Similarity Filter](range-query).
68+
`rabitq8`, `rabitq4` are types defined by VectorChord. For more information about `rabitq8`, `rabitq4`, refer to [Quantization Types](quantization-types).
6369

64-
All operator classes are available since version `0.3.0`.
70+
The first 6 operator classes are available since version `0.5.0`, and the last 6 operator classes are available since version `1.1.0`.
6571

6672
### Indexing Options <badge type="info" text="vchordg" />
6773

@@ -122,11 +128,13 @@ All operator classes are available since version `0.3.0`.
122128
- `vchordg.enable_scan = off` disables the query planner's use of `vchordg` index scan.
123129
- `vchordg.enable_scan = on` enables the query planner's use of `vchordg` index scan.
124130

125-
#### `vchordg.ef_search` <badge type="tip" text="since v0.5.0" />
131+
#### `vchordg.ef_search` <badge type="tip" text="since v0.5.0" /> {#search-parameters-vchordg-ef-search}
126132

127133
- Description: The size of the dynamic list containing the nearest neighbors in search. The larger `vchordg.ef_search` is, the better the recall, but the worse the QPS. `vchordg.ef_search` corresponds to $\text{ef}$ in HNSW and DiskANN.
128134
- Type: integer
129-
- Default: `64`
135+
- Default:
136+
- `64`
137+
- This parameter supports [fallback](fallback-parameters).
130138
- Domain: `[1, 65535]`
131139
- Example:
132140
- `SET vchordg.ef_search = 64` indicates the size of the dynamic list containing the nearest neighbors is $64$ during search.

0 commit comments

Comments
 (0)