Replies: 3 comments 4 replies
-
Two questions after the draft change by @gaurav274.
|
Beta Was this translation helpful? Give feedback.
-
I like it! Looks good. Regarding the |
Beta Was this translation helpful? Give feedback.
-
Goal
Support index creation on columns of table.
SQL Syntax
CREATE INDEX [IF NOT EXISTS] name ON table (column1, column2 ... columnN);
Initial Index Support
I plan to use HNSW index as my starting point, because it requires minimal parameter to create the index. Others all need some sort of parameters.
Discussion Questions
USING method
syntax support. I wonder should I support this in the first PR or we can add support later but just support HNSW first?User workflow
Image Dataset
Few other queries:
Return Top-5 similar images
Search for similar images with threshold of 0.8 and also return top-5
Video Dataset
Feature requirements
CREATE INDEX
command on features (FunctionalExpression
) usingfaiss
. In the first version, we can hardcode a fixed index type. In the future, we can support adding more parameters based on which index faiss index type to pick. Note, additionally, we need to keep a reverse mapping fromfaiss
index number to the source table.similarity
predicate to an index scan usingfaiss
. This requires matching the FunctionalExpression, retrieving the matched features from faiss, using reverse mapping to get source tablerow_id
, and lastly usingrow_id
to get the source table row. Since we will use primary keys for the reverse mapping, we can leverage indexes to speed up the retrievals.similarity
keyword:similarity(data1, data2, UDF, METRIC)
- We can set the default value of metric to euclidean. Can easily provide metrics supported byfaiss
.similarity
predicate and return the results.Future Support
create materialized
command.Beta Was this translation helpful? Give feedback.
All reactions