You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing the hybrid search the following code in libs/mongodb/langchain_mongodb/retrievers/hybrid_search.py cause a key value error if the text_key is a nested filed example title.text
# Formatting
docs = []
for res in cursor:
text = res.pop(self.vectorstore._text_key)
# score = res.pop("score") # The score remains buried!
make_serializable(res)
docs.append(Document(page_content=text, metadata=res))
return docs
The text was updated successfully, but these errors were encountered:
abdelsalamhamdi
changed the title
Hybrid search fail due to Text_key is stored in the nest field
Hybrid search fail due to Text_key is stored in a nested field
Nov 27, 2024
When performing the hybrid search the following code in
libs/mongodb/langchain_mongodb/retrievers/hybrid_search.py
cause a key value error if the text_key is a nested filed exampletitle.text
The text was updated successfully, but these errors were encountered: