You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched existing ideas and did not find a similar one
I added a very descriptive title
I've clearly described the feature request and motivation for it
Feature request
Hi,
I checked the PrismaVectorStore code but I didn't find a way to do a filter on association from the Prisma schema. Let's say I have as tables:
Article (having a column authorName)
ArticleDocument (being used by the vector store, with a column being articleId)
How could I do a similaritySearchVectorWithScore by applying a where clause so it applies only on articles being written by someone?
Otherwise, I could first make a query on my side to get all articleId that match the author name expected, to pass them into the filter: { articleId: { in: [...] } } property of similaritySearchVectorWithScore. Is it the recommended way to do so?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
Hi,
I checked the PrismaVectorStore code but I didn't find a way to do a
filter
on association from the Prisma schema. Let's say I have as tables:Article
(having a columnauthorName
)ArticleDocument
(being used by the vector store, with a column beingarticleId
)How could I do a
similaritySearchVectorWithScore
by applying awhere
clause so it applies only on articles being written by someone?Otherwise, I could first make a query on my side to get all
articleId
that match the author name expected, to pass them into thefilter: { articleId: { in: [...] } }
property ofsimilaritySearchVectorWithScore
. Is it the recommended way to do so?Thank you,
cc @jacoblee93 @Speuce @bracesproul
Note that on my side, the
filter
typing is totally broken on.similaritySearchVectorWithScore()
but not with.create()
Motivation
I'm having a table for indexing documents, but from the frontend the user should be able to filter based on static fields (ENUMs or so).
Proposal (If applicable)
No response
Beta Was this translation helpful? Give feedback.
All reactions