mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-31 10:23:18 +00:00
community: fix AzureSearch delete documents (#22315)
**Description** Fix AzureSearch delete documents method by using FIELDS_ID variable instead of the hard coded "id" value **Issue:** This is linked to this issue: https://github.com/langchain-ai/langchain/issues/22314 Co-authored-by: dseban <dan.seban@neoxia.com>
This commit is contained in:
@@ -401,7 +401,7 @@ class AzureSearch(VectorStore):
|
||||
False otherwise.
|
||||
"""
|
||||
if ids:
|
||||
res = self.client.delete_documents([{"id": i} for i in ids])
|
||||
res = self.client.delete_documents([{FIELDS_ID: i} for i in ids])
|
||||
return len(res) > 0
|
||||
else:
|
||||
return False
|
||||
|
Reference in New Issue
Block a user