Commit 1404a72
## 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
- 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
- Added proper handling for empty where clauses
## Testing
- Verified fix resolves the syntax errors reported in issue #13028
- Vector search functionality now works correctly with existing
collections
Fixes #13028
---------
Co-authored-by: Jian Wang <jianwang3@microsoft.com>
Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
1 parent 1211af3 commit 1404a72
File tree
2 files changed
+3590
-3590
lines changed- python
- semantic_kernel/connectors
2 files changed
+3590
-3590
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
795 | 794 | | |
796 | 795 | | |
797 | 796 | | |
| 797 | + | |
| 798 | + | |
798 | 799 | | |
799 | 800 | | |
800 | 801 | | |
801 | 802 | | |
802 | 803 | | |
803 | 804 | | |
804 | 805 | | |
805 | | - | |
| 806 | + | |
| 807 | + | |
806 | 808 | | |
807 | | - | |
| 809 | + | |
808 | 810 | | |
809 | 811 | | |
810 | 812 | | |
811 | 813 | | |
812 | 814 | | |
813 | 815 | | |
814 | | - | |
815 | | - | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
816 | 819 | | |
817 | 820 | | |
818 | 821 | | |
819 | 822 | | |
820 | 823 | | |
821 | 824 | | |
822 | 825 | | |
823 | | - | |
| 826 | + | |
824 | 827 | | |
| 828 | + | |
825 | 829 | | |
826 | 830 | | |
827 | 831 | | |
| |||
0 commit comments