Skip to content

Commit

Permalink
keep old index (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanniser committed Oct 21, 2024
1 parent 341950b commit 5fae697
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ export const products = pgTable(
image_url: text("image_url"),
},
(table) => ({
nameSearchIndex: index("name_search_index")
nameSearchIndex: index("name_search_index").using(
"gin",
sql`to_tsvector('english', ${table.name})`,
),
nameTrgmIndex: index("trgm")
.using("gin", sql`${table.name}`, sql`gi`, sql`n_trgm_ops`)
.concurrently(),
}),
Expand Down

0 comments on commit 5fae697

Please sign in to comment.