Support Vector Search with MaxDistance
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Feature Request
**Is your feature request related to a problem? Please describe:**
Sometimes we want to perform Vector Search with a maximum distance, like:
```sql
SELECT
meta,
text,
VEC_COSINE_DISTANCE(vector, "[1,2,3]") AS distance
FROM test
WHERE distance <= 0.4
ORDER BY distance ASC
LIMIT 10
```
Currently this SQL will not hit Vector Index because optimizer will discard SQLs containing any WHERE conditions.
However, supporting this specific WHERE condition (which is a max distance predicate) should be much easier than supporting any WHERE conditions.
**Describe the feature you'd like:**
Support search via index with maximum distance.
**Describe alternatives you've considered:**
**Teachability, Documentation, Adoption, Migration Strategy:**
Contributor guide
Assessment
This issue has not been assessed yet.