Skip to content

Conversation

@barnuri
Copy link

@barnuri barnuri commented Nov 17, 2025

This pull request adds a new method to the VectorStore class in vectorstores.py, enhancing its functionality to support similarity search directly by vector input.

New functionality:

  • Added the similarity_search_by_vector method to the VectorStore class, allowing users to perform similarity searches using a query vector and returning relevant documents.

@blink1073 blink1073 changed the title feat_add_search_by_vector INTPYTHON-832 Add search_by_vector method to VectorStore Nov 19, 2025
@blink1073
Copy link
Collaborator

Hi @barnuri, thanks again for this PR! Can you please add a test for this new method to https://github.com/langchain-ai/langchain-mongodb/blob/main/libs/langchain-mongodb/tests/integration_tests/test_vectorstore_from_texts.py?

@caseyclements
Copy link
Collaborator

Hi @barnuri. Just curious. Even though _similarity_search_with_score is marked for internal use by its leading underscore, what motivated you not to use it?

@barnuri
Copy link
Author

barnuri commented Nov 20, 2025

Hi @barnuri. Just curious. Even though _similarity_search_with_score is marked for internal use by its leading underscore, what motivated you not to use it?

we have a logic that already have the vector, and tried multiple searches, so embedded it every time instead of passing the vector its a waste

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants