Skip to content
1 min read · 69 words

Function: translateRedisFilter()

ts
function translateRedisFilter(filter?: VectorFilter): string;

Defined in: batteries/vector/redis/index.ts:84

Compile the neutral filter tree to a RediSearch query fragment. TAG fields hold string / boolean metadata; NUMERIC fields hold numbers. Returns a fragment to AND with the KNN clause (or to use alone for a filter-scan). Throws on operators RediSearch can't express.

Parameters

ParameterType
filter?VectorFilter

Returns

string