Commit e907d18
fix: Valkey vector search - remove unsupported SORTBY (#356)
* fix: Valkey vector search - remove unsupported SORTBY and fix tag filter syntax
Valkey Search KNN queries return results pre-sorted by distance, so
explicit SORTBY is not supported and causes a ResponseError. This removes
the .sort_by() call from the query builder.
Additionally, fixes the project tag filter to use unquoted syntax with
backslash escaping for special characters (e.g. hyphens, dots) instead
of the quoted syntax which was returning empty results.
Updates unit tests to reflect both changes: replaces three metric-specific
sort order tests with a single test asserting no SORTBY is set, and
updates escaping assertions to match the new backslash-escape approach.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* style: apply ruff format to eg_valkey.py and test_valkey.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Manisha4 <Manisha4@github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent f689d3e commit e907d18
2 files changed
Lines changed: 19 additions & 79 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1138 | 1138 | | |
1139 | 1139 | | |
1140 | 1140 | | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1145 | 1146 | | |
1146 | | - | |
1147 | 1147 | | |
1148 | | - | |
| 1148 | + | |
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | | - | |
1153 | | - | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
1157 | 1155 | | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
| 1156 | + | |
1163 | 1157 | | |
1164 | 1158 | | |
1165 | 1159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1627 | 1627 | | |
1628 | 1628 | | |
1629 | 1629 | | |
1630 | | - | |
| 1630 | + | |
1631 | 1631 | | |
1632 | 1632 | | |
1633 | 1633 | | |
| |||
1645 | 1645 | | |
1646 | 1646 | | |
1647 | 1647 | | |
1648 | | - | |
1649 | 1648 | | |
1650 | 1649 | | |
1651 | 1650 | | |
1652 | 1651 | | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
| 1652 | + | |
| 1653 | + | |
1656 | 1654 | | |
1657 | 1655 | | |
1658 | | - | |
| 1656 | + | |
1659 | 1657 | | |
1660 | 1658 | | |
1661 | 1659 | | |
| |||
1677 | 1675 | | |
1678 | 1676 | | |
1679 | 1677 | | |
1680 | | - | |
| 1678 | + | |
1681 | 1679 | | |
1682 | 1680 | | |
1683 | | - | |
1684 | | - | |
| 1681 | + | |
| 1682 | + | |
1685 | 1683 | | |
1686 | 1684 | | |
1687 | 1685 | | |
| |||
1702 | 1700 | | |
1703 | 1701 | | |
1704 | 1702 | | |
1705 | | - | |
1706 | | - | |
1707 | | - | |
1708 | | - | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
1714 | | - | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
1748 | | - | |
1749 | | - | |
1750 | | - | |
1751 | | - | |
1752 | | - | |
1753 | | - | |
1754 | | - | |
1755 | | - | |
1756 | | - | |
1757 | | - | |
1758 | | - | |
| 1703 | + | |
| 1704 | + | |
1759 | 1705 | | |
1760 | 1706 | | |
1761 | 1707 | | |
| |||
0 commit comments