Skip to content

Commit

Permalink
search-documents: correct method calls in sample (#14980)
Browse files Browse the repository at this point in the history
* samples/sample_crud_operations.py: update merge and delete documents samples to use the correct methods.
  • Loading branch information
ljos authored Nov 3, 2020
1 parent 8ac37df commit 141277c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def upload_document():

def merge_document():
# [START merge_document]
result = search_client.upload_documents(documents=[{"HotelId": "1000", "Rating": 4.5}])
result = search_client.merge_documents(documents=[{"HotelId": "1000", "Rating": 4.5}])

print("Merge into new document succeeded: {}".format(result[0].succeeded))
# [END merge_document]

def delete_document():
# [START delete_document]
result = search_client.upload_documents(documents=[{"HotelId": "1000"}])
result = search_client.delete_documents(documents=[{"HotelId": "1000"}])

print("Delete new document succeeded: {}".format(result[0].succeeded))
# [END delete_document]
Expand Down

0 comments on commit 141277c

Please sign in to comment.