Skip to main content

Interface: VectorFilterBuilder<Document, VectorIndexConfig>

server.VectorFilterBuilder

An interface for defining filters for vector searches.

This has a similar interface to FilterBuilder, which is used in database queries, but supports only the methods that can be efficiently done in a vector search.

Type parameters

NameType
Documentextends GenericDocument
VectorIndexConfigextends GenericVectorIndexConfig

Methods

eq

eq<FieldName>(fieldName, value): FilterExpression<boolean>

Is the field at fieldName equal to value

Type parameters

NameType
FieldNameextends string

Parameters

NameType
fieldNameFieldName
valueFieldTypeFromFieldPath<Document, FieldName>

Returns

FilterExpression<boolean>

Defined in

server/vector_search.ts:110


or

or(...exprs): FilterExpression<boolean>

exprs[0] || exprs[1] || ... || exprs[n]

Parameters

NameType
...exprsFilterExpression<boolean>[]

Returns

FilterExpression<boolean>

Defined in

server/vector_search.ts:122