langchain-ai / langchain-elastic

Elasticsearch integration into LangChain
MIT License
44 stars 14 forks source link

fix: safely read metadata in default doc builder #16

Closed TattdCodeMonkey closed 6 months ago

TattdCodeMonkey commented 6 months ago

Updated the default_doc_builder function in _search to safely read the metadata field and default it to an empty object if it doesn't exist on the hit source document.

Closes #7

maxjakob commented 6 months ago

Already fixed by a community contribution in https://github.com/langchain-ai/langchain-elastic/pull/8.