Skip to content

Commit c194523

Browse files
author
rusty
committed
feat: add async and sync hybrid search index creation methods
1 parent 6148b10 commit c194523

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

langchain_postgres/v2/vectorstores.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,20 @@ def max_marginal_relevance_search_with_score_by_vector(
789789
)
790790
)
791791

792+
async def aapply_hybrid_search_index(
793+
self,
794+
concurrently: bool = False,
795+
) -> None:
796+
"""Creates a TSV index in the vector store table if possible."""
797+
return await self._engine._run_as_async(self.__vs.aapply_hybrid_search_index(concurrently=concurrently))
798+
799+
def apply_hybrid_search_index(
800+
self,
801+
concurrently: bool = False,
802+
) -> None:
803+
"""Creates a TSV index in the vector store table if possible."""
804+
return self._engine._run_as_sync(self.__vs.aapply_hybrid_search_index(concurrently=concurrently))
805+
792806
async def aapply_vector_index(
793807
self,
794808
index: BaseIndex,

0 commit comments

Comments
 (0)