k-nearest-neighbour search functionality is a way to find entries based on their distance to a specific vector.
The general function syntax for knn is:
distance(<target column>, <vector to compare with>, <metric> [, <weights>]).
To express a k-Nearest-Neighbour search in SQL, you can combine the
distance function with a
ORDER BY clause.
Currently the following metrics are supported:
- L2 squared