Skip to content

INTPYTHON-605 Removed unused vector_index_name from docstring and a unit test #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion libs/langchain-mongodb/langchain_mongodb/vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ def __init__(
text_key: MongoDB field that will contain the text for each document
index_name: Existing Atlas Vector Search Index
embedding_key: Field that will contain the embedding for each document
vector_index_name: Name of the Atlas Vector Search index
relevance_score_fn: The similarity score used for the index
Currently supported: 'euclidean', 'cosine', and 'dotProduct'
dimensions: Number of dimensions in embedding. If the value is set and
Expand Down
10 changes: 5 additions & 5 deletions libs/langchain-mongodb/tests/unit_tests/test_vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_from_documents(
documents,
embedding_openai,
collection=collection,
vector_index_name=INDEX_NAME,
index_name=INDEX_NAME,
)
self._validate_search(
vectorstore, collection, metadata=documents[2].metadata["c"]
Expand All @@ -117,7 +117,7 @@ def test_from_texts(
texts,
embedding_openai,
collection=collection,
vector_index_name=INDEX_NAME,
index_name=INDEX_NAME,
)
self._validate_search(vectorstore, collection, metadata=None)

Expand All @@ -136,7 +136,7 @@ def test_from_texts_with_metadatas(
embedding_openai,
metadatas=metadatas,
collection=collection,
vector_index_name=INDEX_NAME,
index_name=INDEX_NAME,
)
self._validate_search(vectorstore, collection, metadata=metadatas[2]["c"])

Expand All @@ -155,7 +155,7 @@ def test_from_texts_with_metadatas_and_pre_filter(
embedding_openai,
metadatas=metadatas,
collection=collection,
vector_index_name=INDEX_NAME,
index_name=INDEX_NAME,
)
collection._aggregate_result = list(
filter(
Expand All @@ -177,7 +177,7 @@ def test_mmr(
texts,
embedding=embedding_openai,
collection=collection,
vector_index_name=INDEX_NAME,
index_name=INDEX_NAME,
)
query = "foo"
self._validate_search(
Expand Down
Loading