Context
The vectorstore abstraction supports several query operators (Equal, GreaterThan, Like, ContainsAny, etc.) across backends (Redis, Weaviate, Qdrant, Pinecone). When a query uses an operator a backend does not support, the failure surfaces as the generic ErrNotSupported with no indication of which field or operator caused it — hard to diagnose.
What to do
- Add a pre-flight validator in
store.go:
func ValidateQuery(query Query, supportedOperators []QueryOperator) error
that rejects operators not in the supported set and surfaces type mismatches.
- Extend
errors.go with ErrInvalidOperator and ErrInvalidQueryValue sentinel errors.
- Add a helper
SupportedOperatorsForBackend(backendType VectorStoreType) []QueryOperator.
- In at least one backend (e.g.
redis.go), wrap query failures with field name and operator, e.g. "query failed on field 'age' with operator 'Like': operation not supported".
Acceptance criteria
File pointers
- Store interface + operators:
deepintshield_server/framework/vectorstore/store.go (interface ~80-107, operators ~28-42)
- Errors:
deepintshield_server/framework/vectorstore/errors.go
- Example backend:
deepintshield_server/framework/vectorstore/redis.go
Context
The
vectorstoreabstraction supports several query operators (Equal, GreaterThan, Like, ContainsAny, etc.) across backends (Redis, Weaviate, Qdrant, Pinecone). When a query uses an operator a backend does not support, the failure surfaces as the genericErrNotSupportedwith no indication of which field or operator caused it — hard to diagnose.What to do
store.go:errors.gowithErrInvalidOperatorandErrInvalidQueryValuesentinel errors.SupportedOperatorsForBackend(backendType VectorStoreType) []QueryOperator.redis.go), wrap query failures with field name and operator, e.g."query failed on field 'age' with operator 'Like': operation not supported".Acceptance criteria
ValidateQuerycan be called before execution and returns errors that name the offending field and operator.go test ./framework/vectorstore/...passes.File pointers
deepintshield_server/framework/vectorstore/store.go(interface ~80-107, operators ~28-42)deepintshield_server/framework/vectorstore/errors.godeepintshield_server/framework/vectorstore/redis.go