mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-10 22:56:55 +08:00
Updated example [skip ci]
This commit is contained in:
@@ -255,7 +255,7 @@ CREATE TABLE items (embedding vector(3), category_id int) PARTITION BY LIST(cate
|
|||||||
Use together with Postgres [full-text search](https://www.postgresql.org/docs/current/textsearch-intro.html) for hybrid search.
|
Use together with Postgres [full-text search](https://www.postgresql.org/docs/current/textsearch-intro.html) for hybrid search.
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
SELECT id, ts_rank_cd(textsearch, query) AS rank
|
SELECT id, content, ts_rank_cd(textsearch, query) AS rank
|
||||||
FROM items, to_tsquery('hello & search') query
|
FROM items, to_tsquery('hello & search') query
|
||||||
WHERE textsearch @@ query ORDER BY rank DESC LIMIT 5;
|
WHERE textsearch @@ query ORDER BY rank DESC LIMIT 5;
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user