Skip to content

Commit 6198383

Browse files
kemingyKeming
andauthored
fix: align the col name for embedding (#76)
* fix: align the col name for embedding Signed-off-by: Keming <[email protected]> * fix typos lint Signed-off-by: Keming <[email protected]> --------- Signed-off-by: Keming <[email protected]> Co-authored-by: Keming <[email protected]>
1 parent 4640115 commit 6198383

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/usage/indexing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Indexing is the process of building a data structure that allows for efficient s
55
To construct an index for vectors, first create a table named `items` with a column named `embedding` of type `vector(n)`. Then, populate the table with generated data.
66

77
```sql
8-
CREATE TABLE items (val vector(3));
9-
INSERT INTO items (val) SELECT ARRAY[random(), random(), random()]::real[] FROM generate_series(1, 1000);
8+
CREATE TABLE items (embedding vector(3));
9+
INSERT INTO items (embedding) SELECT ARRAY[random(), random(), random()]::real[] FROM generate_series(1, 1000);
1010
```
1111

1212
::: tip

src/use-case/sparse-vector.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ D_{L2} = \Sigma (x_i - y_i) ^ 2
200200
$$
201201
For sparse vectors, `vector_dot_ops` calculates the dot product, which is a more efficient method.
202202
$$
203-
D_{dot} = - \Sigma x_iy_i
203+
D_{dot} = - \Sigma x_i y_i
204204
$$
205205

206206

@@ -266,4 +266,4 @@ scores = reranker.compute_score([["The text you want to search...", candidate] f
266266
reranked_text = [t for _, t in sorted(zip(scores, mix_text))]
267267
```
268268

269-
Congratulations! We have now completed our first step into the world of sparse vector search.
269+
Congratulations! We have now completed our first step into the world of sparse vector search.

typos.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[default]
2+
extend-ignore-re = ['\$.+\$']
3+
extend-ignore-identifiers-re = ['\$.+\$']

0 commit comments

Comments
 (0)