Skip to content

Commit eb44c26

Browse files
authored
chore: fix typos (#228)
Signed-off-by: Keming <kemingyang@tensorchord.ai>
1 parent 16af213 commit eb44c26

File tree

19 files changed

+56
-32
lines changed

19 files changed

+56
-32
lines changed

.github/workflows/typos.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Typos check
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
merge_group:
9+
workflow_dispatch:
10+
11+
jobs:
12+
run:
13+
name: Spell Check with Typos
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Actions Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Check spelling of file.txt
20+
uses: crate-ci/typos@master
21+
with:
22+
config: .typos.toml

.typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[default.extend-words]
2+
ND = "ND"

bindings/python/src/pgvecto_rs/sdk/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def search(
8686
8787
Returns:
8888
-------
89-
List of records and coresponding distances.
89+
List of records and corresponding distances.
9090
9191
"""
9292
with Session(self._engine) as session:

bindings/python/tests/test_psycopg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_create_index(conn: Connection, index_name: str, index_setting: str):
4545
conn.commit()
4646

4747

48-
# The server cannot handle invalid vectors curently, see https://github.com/tensorchord/pgvecto.rs/issues/96
48+
# The server cannot handle invalid vectors currently, see https://github.com/tensorchord/pgvecto.rs/issues/96
4949
# def test_invalid_insert(conn: Connection):
5050
# for i, e in enumerate(INVALID_VECTORS):
5151
# try:

crates/service/src/worker/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl Worker {
132132
view.flush();
133133
Ok(())
134134
}
135-
pub fn call_destory(&self, handle: Handle) {
135+
pub fn call_destroy(&self, handle: Handle) {
136136
let mut protect = self.protect.lock();
137137
if protect.indexes.remove(&handle).is_some() {
138138
protect.maintain(&self.view);

docs/get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ SELECT * FROM items ORDER BY embedding <-> '[3,2,1]' LIMIT 5;
6060

6161
## Half-precision floating-point
6262

63-
`vecf16` type is the same with `vector` in anything but the scalar type. It stores 16-bit floating point numbers. If you want to reduce the memory usage to get better performace, you can try to replace `vector` type with `vecf16` type.
63+
`vecf16` type is the same with `vector` in anything but the scalar type. It stores 16-bit floating point numbers. If you want to reduce the memory usage to get better performance, you can try to replace `vector` type with `vecf16` type.
6464

6565
## Things You Need to Know
6666

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ DROP EXTENSION IF EXISTS vectors;
1515
CREATE EXTENSION vectors;
1616
```
1717

18-
To acheive full performance, please mount the volume to pg data directory by adding the option like `-v $PWD/pgdata:/var/lib/postgresql/data`
18+
To achieve full performance, please mount the volume to pg data directory by adding the option like `-v $PWD/pgdata:/var/lib/postgresql/data`
1919

2020
You can configure PostgreSQL by the reference of the parent image in https://hub.docker.com/_/postgres/.
2121

docs/searching.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ If `vectors.k` is set to `64`, but your SQL returned less than `64` rows, for ex
1212

1313
* Less than `64` rows should be returned. It's expected.
1414
* The vector index returned `64` rows, but `32` of which are deleted before but the index do not know since PostgreSQL vacuum is lazy.
15-
* The vector index returned `64` rows, but `32` of which are invisble to the transaction so PostgreSQL decided to hide these rows for you.
16-
* The vector index returned `64` rows, but `32` of which are satifying the condition `id % 2 = 0` in `WHERE` clause.
15+
* The vector index returned `64` rows, but `32` of which are invisible to the transaction so PostgreSQL decided to hide these rows for you.
16+
* The vector index returned `64` rows, but `32` of which are satisfying the condition `id % 2 = 0` in `WHERE` clause.
1717

1818
There are four ways to solve the problem:
1919

2020
* Set `vectors.k` larger. If you estimate that 20% of rows will satisfy the condition in `WHERE`, just set `vectors.k` to be 5 times than before.
21-
* Set `vectors.enable_vector_index` to `off`. If you estimate that 0.0001% of rows will satisfy the condition in `WHERE`, just do not use vector index. No alogrithms will be faster than brute force by PostgreSQL.
21+
* Set `vectors.enable_vector_index` to `off`. If you estimate that 0.0001% of rows will satisfy the condition in `WHERE`, just do not use vector index. No algorithms will be faster than brute force by PostgreSQL.
2222
* Set `vectors.enable_prefilter` to `on`. If you cannot estimate how many rows will satisfy the condition in `WHERE`, leave the job for the index. The index will check if the returned row can be accepted by PostgreSQL. However, it will make queries slower so the default value for this option is `off`.
2323
* Set `vectors.enable_vbase` to `on`. It will use vbase optimization, so that the index will pull rows as many as you need. It only works for HNSW algorithm.
2424

src/bgworker/normal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ fn session(worker: Arc<Worker>, mut handler: RpcHandler) -> Result<(), IpcError>
9898
Ok(()) => handler = x.leave()?,
9999
Err(e) => x.reset(e)?,
100100
},
101-
RpcHandle::Destory { handle, x } => {
102-
worker.call_destory(handle);
101+
RpcHandle::Destroy { handle, x } => {
102+
worker.call_destroy(handle);
103103
handler = x.leave()?;
104104
}
105105
RpcHandle::Stat { handle, x } => match worker.call_stat(handle) {

src/bgworker/upgrade.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn session(handler: RpcHandler) -> Result<(), IpcError> {
6060
RpcHandle::Insert { x, .. } => x.reset(FriendlyError::Upgrade)?,
6161
RpcHandle::Delete { x, .. } => x.reset(FriendlyError::Upgrade)?,
6262
RpcHandle::Flush { x, .. } => x.reset(FriendlyError::Upgrade)?,
63-
RpcHandle::Destory { x, .. } => x.reset(FriendlyError::Upgrade)?,
63+
RpcHandle::Destroy { x, .. } => x.reset(FriendlyError::Upgrade)?,
6464
RpcHandle::Stat { x, .. } => x.reset(FriendlyError::Upgrade)?,
6565
RpcHandle::Vbase { x, .. } => x.reset(FriendlyError::Upgrade)?,
6666
}

0 commit comments

Comments
 (0)