Skip to content

Commit

Permalink
Update postgres.py (run-llama#7741)
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanalexandrutreica authored Sep 20, 2023
1 parent a8a101f commit fe905dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Bug Fixes / Nits
- Added node post-processors to async context chat engine (#7731)
- Added unique index name for postgres tsv column (#7741)

## [0.8.29.post1] - 2023-09-18

Expand Down
3 changes: 2 additions & 1 deletion llama_index/vector_stores/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class TSVector(TypeDecorator):

tablename = "data_%s" % index_name # dynamic table name
class_name = "Data%s" % index_name # dynamic class name
indexname = "%s_idx" % index_name # dynamic class name

if hybrid_search:

Expand All @@ -64,7 +65,7 @@ class HybridAbstractData(base): # type: ignore
model = type(class_name, (HybridAbstractData,), {"__tablename__": tablename})

Index(
"text_search_tsv_idx",
indexname,
model.text_search_tsv, # type: ignore
postgresql_using="gin",
)
Expand Down

0 comments on commit fe905dc

Please sign in to comment.