Skip to content

[Store][PG] Allow to change vector type and index type #198

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

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Jul 24, 2025

Q A
Bug fix? no
New feature? yes
Docs? no
Issues
License MIT

Gemini gives me vector of 3072 dimms.
But PG vector can't handle that much dimms. ref
So a workarround is to change the vectory type, and so the index.

Example:

app=# \d gemini
                   Table "public.gemini"
  Column   |     Type      | Collation | Nullable | Default 
-----------+---------------+-----------+----------+---------
 id        | uuid          |           | not null | 
 metadata  | jsonb         |           |          | 
 embedding | halfvec(3072) |           | not null | 
Indexes:
    "gemini_pkey" PRIMARY KEY, btree (id)
    "gemini_embedding_idx" hnsw (embedding halfvec_cosine_ops)

app=# select count(*) from gemini ;
 count 
-------
   384
(1 row)

@lyrixx lyrixx changed the title [Store][PG] Allow to change vector type and index type [WIP][Store][PG] Allow to change vector type and index type Jul 24, 2025
@lyrixx lyrixx force-pushed the store-pg-vector-size branch from f6312c1 to 3e4b7df Compare July 24, 2025 12:44
@lyrixx lyrixx force-pushed the store-pg-vector-size branch from 3e4b7df to 83d27e8 Compare July 24, 2025 12:45
@lyrixx lyrixx changed the title [WIP][Store][PG] Allow to change vector type and index type [Store][PG] Allow to change vector type and index type Jul 24, 2025
@chr-hertel chr-hertel added the Store Issues & PRs about the AI Store component label Jul 24, 2025
@chr-hertel
Copy link
Member

Thank you @lyrixx.

@chr-hertel chr-hertel merged commit 15ea8a8 into symfony:main Jul 24, 2025
17 of 18 checks passed
@lyrixx lyrixx deleted the store-pg-vector-size branch July 25, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Store Issues & PRs about the AI Store component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants