Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Feb 17, 2025
1 parent 6ac9adc commit 7465e1b
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,15 @@ def _convert_input_document(document: Union[dict, Document]):
if embedding := document_dict.pop("embedding", []):
document_dict["$vector"] = embedding

if "dataframe" in document_dict and document_dict["dataframe"] is not None:
logger.warning(
"Document %s has the `dataframe` field set. "
"AstraDocumentStore no longer supports dataframes and this field will be ignored. "
"The `dataframe` field will soon be removed from Haystack Document.",
document_dict["_id"],
)
if "dataframe" in document_dict:
dataframe = document_dict.pop("dataframe", None)
if dataframe:
logger.warning(
"Document %s has the `dataframe` field set. "
"AstraDocumentStore no longer supports dataframes and this field will be ignored. "
"The `dataframe` field will soon be removed from Haystack Document.",
document_dict["_id"],
)

if "sparse_embedding" in document_dict:
sparse_embedding = document_dict.pop("sparse_embedding", None)
Expand Down

0 comments on commit 7465e1b

Please sign in to comment.