Skip to content

Commit 14832f8

Browse files
committed
add better indexes for symbol rank
1 parent 054b9d0 commit 14832f8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- Speed up symbol-search reranking queries by indexing content-hash scoped symbol lookups
2+
-- and definition-only symbol reference joins.
3+
4+
CREATE INDEX IF NOT EXISTS idx_symbol_references_definition_symbol_id
5+
ON symbol_references (symbol_id)
6+
WHERE kind = 'definition';
7+
8+
CREATE INDEX IF NOT EXISTS idx_symbols_content_hash_name_lc_id
9+
ON symbols (content_hash, name_lc, id);

0 commit comments

Comments
 (0)