Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
Ivan edited this page Feb 5, 2016 · 1 revision

ADAM is based on PostgreSQL 9.3 and therefore supports the same SQL syntax. For the IR elements, note the following syntax.

CREATE

ADAM comes with a feature data type to store feature vectors (i.e., float arrays).

Example: CREATE TABLE mytable (id INT, f feature)

Feature vectors are always specified as '<dim1,dim2,dim3,...,dimN>'.

INDEX

ADAM supports Vector Approximation-File (VA-File) for indexing feature vectors with the option of equidistant marks and equifrequent marks.

Example: CREATE VA ON mytable (f) USING EQUIFREQUENT MARKS

Example: CREATE VA ON mytable (f) USING EQUIDISTANT MARKS

SELECT

For k nearest neighbor queries, ADAM supports the following syntax:

Example: SELECT ... FROM mytable USING DISTANCE MINKOWSKI(1)(f, '<0.1,0.2,0.3>') LIMIT 100

Clone this wiki locally