spring-projects / spring-projects/spring-ai
Schema is not re-initialized when using PGVector VectorStore
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 5
Description
The "initilize-schema" setting for the vector store instructs the spring ai to initialize the required schema for the application. For the PGVector it is not an exception.
The problem however is that (at least with PGVector, do not really now about other databases). The schema is indeed initialized, but it is not "re-initialized" if something has changed. For instance, if the dimensions of the vector have been changed (i.e. spring.ai.vectorstore.pgvector.dimensions), then I would expect spring ai to re-create the table and the corresponding vector column with new dimensions, but currently it does not happen.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PGVector VectorStore auto-configuration and the initialize-schema setting described in the linked PGVector documentation. Trace how spring.ai.vectorstore.pgvector.dimensions is applied during schema initialization, then verify that changing it recreates the table and vector column with the new dimensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100