-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
community: fix @embeddingKey in azure cosmos db no sql #27377
community: fix @embeddingKey in azure cosmos db no sql #27377
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
when it will be merged? |
I am no expert so anyone should feel free to correct me. But it seems the status "Needs support" means that the PR is on hold until it reaches more engagement. Therefore check the changes out, confirm that they work for you, and use the +1 on the post to voice your opinion. |
) | ||
|
||
# Add where_clause if specified | ||
if pre_filter is not None and pre_filter.get("where_clause") is not None: | ||
query += " {}".format(pre_filter["where_clause"]) | ||
|
||
query += " ORDER BY VectorDistance(c.@embeddingKey, @embeddings)" | ||
query += " ORDER BY VectorDistance(c[@embeddingKey], @embeddings)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not very familiar with Azure CDB NoSQL but is c.@embeddingKey
equivalent to c[@embeddingKey]
? Why make this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, the dot syntax is not supported for variable expressions. You are therefore forced to use brackets if you want to protect yourself against injections. CDB NoSQL seems quite restrictive in its capabilities here. But I do not have greater proficiency in it either, so there may be smarter ways about it.
I will keep this PR as small as the changes made.
Description: fixes a fatal bug syntax error in AzureCosmosDBNoSqlVectorSearch
Issue: #27269 #25468