We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL and MySQL ecosystem exists all kinds of create index scenes as below.
create index
normal
CREATE INDEX idx_name on users(name) ; CREATE INDEX idx_name on users(name) using hash; CREATE UNIQUE INDEX idx_id on users(id);
spatial
CREATE SPATIAL INDEX idx_geom on users(geom);
fulltext
CREATE FULLTEXT INDEX idx_doc(doc) WITH PARSER NGRAM;
vector
MySQL
CREATE VECTOR INDEX idx_embedding ON users(embedding) SECONDARY_ENGINE_ATTRIBUTE=\'{"type":"spann", "distance":"cosine"}\';
CREATE VECTOR INDEX idx_embedding ON users(embedding) WITH (distance=L2, type=hnsw);
Current Dizzle index couldn't implement these demands. So I proposal to add customIndex API to define raw create index statement.
index
customIndex
raw
const users = mysqlTable( "users", { id: bigint({ mode: "bigint" }).autoincrement().primaryKey(), name: varchar({ length: 255 }).notNull(), embedding: vector("embedding", { length: 3 }), }, () => { return { idx_embedding: customIndex({ name: 'idx_embedding', raw: 'CREATE VECTOR INDEX idx_embedding ON users(embedding) SECONDARY_ENGINE_ATTRIBUTE=\'{"type":"spann", "distance":"cosine"}\';', }), idx_fulltext: customIndex({ name: 'idx_fulltext', raw: 'CREATE FULLTEXT INDEX idx_doc(doc) WITH PARSER NGRAM;', }), }; } )
The text was updated successfully, but these errors were encountered:
vectorIndex
Sorry, something went wrong.
No branches or pull requests
Feature hasn't been suggested before.
Describe the enhancement you want to request
Background
MySQL and MySQL ecosystem exists all kinds of
create index
scenes as below.normal
index:spatial
index:CREATE SPATIAL INDEX idx_geom on users(geom);
fulltext
index:vector
index forMySQL
:vector
index for OceanBase (a MySQL-like database but not 100% compatible):Proposal
Current Dizzle
index
couldn't implement these demands. So I proposal to addcustomIndex
API to defineraw
create index statement.The text was updated successfully, but these errors were encountered: