Skip to content

Commit b82e050

Browse files
authored
INTPYTHON-285 Add kwargs to MongoDBAtlasVectorSearch.create_vector_search_index (#154)
1 parent 0f8e549 commit b82e050

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libs/langchain-mongodb/langchain_mongodb/vectorstores.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,7 @@ def create_vector_search_index(
816816
filters: Optional[List[str]] = None,
817817
update: bool = False,
818818
wait_until_complete: Optional[float] = None,
819+
**kwargs: Any,
819820
) -> None:
820821
"""Creates a MongoDB Atlas vectorSearch index for the VectorStore
821822
@@ -834,6 +835,8 @@ def create_vector_search_index(
834835
wait_until_complete (Optional[float]): If given, a TimeoutError is raised
835836
if search index is not ready after this number of seconds.
836837
If not given, the default, operation will not wait.
838+
kwargs: (Optional): Keyword arguments supplying any additional options
839+
to SearchIndexModel.
837840
"""
838841
try:
839842
self._collection.database.create_collection(self._collection.name)
@@ -852,4 +855,5 @@ def create_vector_search_index(
852855
similarity=self._relevance_score_fn,
853856
filters=filters or [],
854857
wait_until_complete=wait_until_complete,
858+
**kwargs,
855859
) # type: ignore [operator]

0 commit comments

Comments
 (0)