Commit b983a9c
committed
fix(query): preserve full maxDistance precision in VECTOR_RANGE query
Replace %.1f format specifier with %s to avoid truncating user-provided
maxDistance values. Previously, maxDistance(0.01) would produce
"VECTOR_RANGE 0.0" (matching nothing) and maxDistance(0.05) would
produce "VECTOR_RANGE 0.1" (doubling the intended radius). Add unit
test verifying sub-decimal precision is preserved.1 parent 975b6b4 commit b983a9c
2 files changed
Lines changed: 19 additions & 1 deletion
File tree
- core/src
- main/java/com/redis/vl/query
- test/java/com/redis/vl/query
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
144 | 162 | | |
0 commit comments