Skip to content

Commit

Permalink
community: fix AzureSearch delete documents (#22315)
Browse files Browse the repository at this point in the history
**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:
#22314

Co-authored-by: dseban <dan.seban@neoxia.com>
  • Loading branch information
2 people authored and hinthornw committed Jun 20, 2024
1 parent d3d0109 commit a1cd4a6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def delete(self, ids: Optional[List[str]] = None, **kwargs: Any) -> bool:
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
Expand Down

0 comments on commit a1cd4a6

Please sign in to comment.