Skip to content

Commit 6cd1fc2

Browse files
aws-rafamsRafael Mosca
andauthored
fix(aurora): add aurora kb sql statement (#1082)
* fix(aurora): add aurora kb sql statement --------- Co-authored-by: Rafael Mosca <[email protected]>
1 parent 9da682f commit 6cd1fc2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lambda/amazon-aurora-pgvector-custom-resources/custom_resources/amazon_aurora_pgvector.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ def execute_sql_commands(
103103
f"CREATE INDEX ON {schema_name}.{table_name} "
104104
f"USING hnsw ({vector_field} vector_cosine_ops);"
105105
)
106+
107+
cur.execute(
108+
f"CREATE INDEX ON {schema_name}.{table_name} "
109+
f"USING gin (to_tsvector('simple'::regconfig, {text_field}));"
110+
)
106111
conn.commit()
107112
except pg8000.ProgrammingError as e:
108113
error_message = f"Error executing SQL commands: {e}"

0 commit comments

Comments
 (0)