vectorDistance

open fun <T> vectorDistance(expression: Expression<T>, targetExpression: Expression<T>, metric: VectorDistanceMetric, queryBuilder: QueryBuilder)

SQL function that returns the mathematical distance calculated between two vector expressions, based on logic provided by the specified distance metric.

Parameters

expression

Expression from which the left vector operand is taken.

targetExpression

Expression from which the right vector operand is taken.

metric

The mathematical formula to use when building the vector function.

queryBuilder

Query builder to append the SQL function to.