Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: align the col name for embedding #76

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/usage/indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Indexing is the process of building a data structure that allows for efficient s
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.

```sql
CREATE TABLE items (val vector(3));
INSERT INTO items (val) SELECT ARRAY[random(), random(), random()]::real[] FROM generate_series(1, 1000);
CREATE TABLE items (embedding vector(3));
INSERT INTO items (embedding) SELECT ARRAY[random(), random(), random()]::real[] FROM generate_series(1, 1000);
```

::: tip
Expand Down
4 changes: 2 additions & 2 deletions src/use-case/sparse-vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ D_{L2} = \Sigma (x_i - y_i) ^ 2
$$
For sparse vectors, `vector_dot_ops` calculates the dot product, which is a more efficient method.
$$
D_{dot} = - \Sigma x_iy_i
D_{dot} = - \Sigma x_i y_i
$$


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

Congratulations! We have now completed our first step into the world of sparse vector search.
Congratulations! We have now completed our first step into the world of sparse vector search.
3 changes: 3 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default]
extend-ignore-re = ['\$.+\$']
extend-ignore-identifiers-re = ['\$.+\$']