-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Python: Fix Cosmos DB NoSQL vector search functionality (issue #13028) #13055
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
Python: Fix Cosmos DB NoSQL vector search functionality (issue #13028) #13055
Conversation
- Fixed VectorDistance function call to use correct 2-parameter syntax instead of 4 parameters - Removed RANK keyword from ORDER BY clause to fix SQL syntax error - Removed distance function parameter setting as it should be configured in vector index, not query - Resolves syntax errors and 'One of the input values is invalid' errors in vector search Fixes microsoft#13028
Python Test Coverage Report •
Python Unit Test Overview
|
@xiaohei520321 thanks for the fix. Please install the
Currently, there's a ruff formatting error that needs to be fixed. |
- Removed unused json import as detected by ruff - The json module is no longer needed after fixing VectorDistance function calls
ok, I will run pre-commit and fix the error |
@xiaohei520321 it doesn't look like the pre-commit is being run properly. There are still ruff formatting errors that must be fixed. See these error logs. |
- Fix implicit string concatenation in distance_clause assignment - Use parentheses for proper multi-line string formatting - Resolves syntax error that prevented hybrid search functionality - Update uv.lock after running pre-commit checks The original code had invalid Python syntax for multi-line string concatenation which caused the hybrid search feature to fail entirely.
I pull main branch and merged main branch, and also run pre-commit again to solve code style, it triggered a lots of changes in uv.lock. And I commit the uv.lock changes also. Is it right now ? |
@microsoft-github-policy-service agree company="Microsoft" |
Summary
Fixes vector search functionality in Cosmos DB NoSQL connector that was failing with syntax errors and "One of the input values is invalid" errors.
Changes
Testing
Fixes #13028