Skip to content
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

Embedded vectors returned as None despite setting return_embedding to True in MongoDBAtlasDocumentStore #184

Closed
TechnoRahmon opened this issue Feb 18, 2024 · 1 comment

Comments

@TechnoRahmon
Copy link

Description:

I'm encountering an issue with the MongoDBAtlasDocumentStore in the Haystack library. Despite setting return_embedding=True in the configuration, embedded vectors are returned as None when retrieving documents from the MongoDB collection.

Steps to Reproduce:

  1. Set up a MongoDBAtlasDocumentStore with the following configuration:
from haystack.document_stores.mongodb_atlas import MongoDBAtlasDocumentStore

ds = MongoDBAtlasDocumentStore(
    mongo_connection_string="mongo_connection_string",
    database_name="squadDB",
    collection_name="dev",
    vector_search_index="vector_search_index",
    return_embedding=True,
    similarity='dotProduct'
)
  1. Save documents to the MongoDB collection using ds.write_documents(squad_docs).

  2. Retrieve documents from the collection using ds.get_all_documents().

  3. Check the embedding of the retrieved documents, e.g., all_docs[0]['embedding'].

Expected Behavior:

The embedding field of the retrieved documents should contain the embedded vectors.

Actual Behavior:

The embedding field of the retrieved documents is None, despite setting return_embedding=True in the configuration.

Additional Information:

  • Operating System: windows 11
  • Python version: python 3.11
  • farm-haystack version: 1.24.1
@anakin87
Copy link
Member

Closing as duplicate of deepset-ai/haystack#7037

@anakin87 anakin87 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2024
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

No branches or pull requests

2 participants