@@ -8,7 +8,7 @@ class DocumentManager:
88 def __init__ (self , client : Client ):
99 self .client = client
1010
11- async def get_documents (
11+ def get_documents (
1212 self ,
1313 index_uid : str ,
1414 offset : Optional [int ] = None ,
@@ -57,7 +57,7 @@ async def get_documents(
5757 except Exception as e :
5858 raise Exception (f"Failed to get documents: { str (e )} " )
5959
60- async def get_document (
60+ def get_document (
6161 self , index_uid : str , document_id : Union [str , int ]
6262 ) -> Dict [str , Any ]:
6363 """Get a single document"""
@@ -67,7 +67,7 @@ async def get_document(
6767 except Exception as e :
6868 raise Exception (f"Failed to get document: { str (e )} " )
6969
70- async def add_documents (
70+ def add_documents (
7171 self ,
7272 index_uid : str ,
7373 documents : List [Dict [str , Any ]],
@@ -80,7 +80,7 @@ async def add_documents(
8080 except Exception as e :
8181 raise Exception (f"Failed to add documents: { str (e )} " )
8282
83- async def update_documents (
83+ def update_documents (
8484 self , index_uid : str , documents : List [Dict [str , Any ]]
8585 ) -> Dict [str , Any ]:
8686 """Update documents in an index"""
@@ -90,7 +90,7 @@ async def update_documents(
9090 except Exception as e :
9191 raise Exception (f"Failed to update documents: { str (e )} " )
9292
93- async def delete_document (
93+ def delete_document (
9494 self , index_uid : str , document_id : Union [str , int ]
9595 ) -> Dict [str , Any ]:
9696 """Delete a single document"""
@@ -100,7 +100,7 @@ async def delete_document(
100100 except Exception as e :
101101 raise Exception (f"Failed to delete document: { str (e )} " )
102102
103- async def delete_documents (
103+ def delete_documents (
104104 self , index_uid : str , document_ids : List [Union [str , int ]]
105105 ) -> Dict [str , Any ]:
106106 """Delete multiple documents by ID"""
@@ -110,7 +110,7 @@ async def delete_documents(
110110 except Exception as e :
111111 raise Exception (f"Failed to delete documents: { str (e )} " )
112112
113- async def delete_all_documents (self , index_uid : str ) -> Dict [str , Any ]:
113+ def delete_all_documents (self , index_uid : str ) -> Dict [str , Any ]:
114114 """Delete all documents in an index"""
115115 try :
116116 index = self .client .index (index_uid )
0 commit comments