-
Notifications
You must be signed in to change notification settings - Fork 1.3k
VectorStore doesn't work with custom schema and custom table #2640
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
Comments
Have you initialized the schema? According to the Spring AI pgvector documentation
|
I did, but it did not do anything. Also, my schema could have multiple tables which needs to store embeddings. How can I configure that given the vector store only takes a single table as a parameter. |
The problem seems to be related to using the custom pgvector store dependency.
As opposed to using PgVectorStore boot starter dependency:
Switching to starter dependency made it work flawlessly. |
I am trying to implementing RAG using pgvector/Postgres and stuck on a strange problem where RAG search fails when running programmatically. The raw query works fine on PostgresDB though.
We have two different issues:
When using the standard textbook implementation we get:
When running the same RAG search query as a native query via Spring JPA, we get this error:
Clearly, the vector extension does exist:
SELECT * FROM pg_extension WHERE extname = 'vector';
-> shows resultThe user has access to relevant accesses.
Here is the complete pgvector configurations:
Spring AI version: M5 (Milestone 5)
Any clue what could be wrong?
UPDATE:
I managed to narrow it down to the fact that it needs explicite "public" schema in my jdbc connection string in order to execute vector queries which is a bug. I don't know if it's just the way it is designed.
Also, multiple tables can act as vector tables but I don't see how i can configure that.
The text was updated successfully, but these errors were encountered: