@@ -865,7 +865,8 @@ def count_documents_by_filter(self, filters: dict[str, Any]) -> int:
865865 count_filter = qdrant_filter ,
866866 )
867867 return response .count
868- except (UnexpectedResponse , ValueError ):
868+ except (UnexpectedResponse , ValueError ) as e :
869+ logger .warning (f"Error { e } when calling QdrantDocumentStore.count_documents_by_filter()" )
869870 return 0
870871
871872 async def count_documents_by_filter_async (self , filters : dict [str , Any ]) -> int :
@@ -888,7 +889,8 @@ async def count_documents_by_filter_async(self, filters: dict[str, Any]) -> int:
888889 count_filter = qdrant_filter ,
889890 )
890891 return response .count
891- except (UnexpectedResponse , ValueError ):
892+ except (UnexpectedResponse , ValueError ) as e :
893+ logger .warning (f"Error { e } when calling QdrantDocumentStore.count_documents_by_filter_async()" )
892894 return 0
893895
894896 def get_metadata_fields_info (self ) -> dict [str , str ]:
@@ -913,7 +915,8 @@ def get_metadata_fields_info(self) -> dict[str, str]:
913915 fields_info [field_name ] = "unknown"
914916
915917 return fields_info
916- except (UnexpectedResponse , ValueError ):
918+ except (UnexpectedResponse , ValueError ) as e :
919+ logger .warning (f"Error { e } when calling QdrantDocumentStore.get_metadata_fields_info()" )
917920 return {}
918921
919922 async def get_metadata_fields_info_async (self ) -> dict [str , str ]:
@@ -991,9 +994,11 @@ def get_metadata_field_min_max(self, metadata_field: str) -> dict[str, Any]:
991994 if min_value is not None and max_value is not None :
992995 return {"min" : min_value , "max" : max_value }
993996 return {}
994- except Exception :
997+ except Exception as e :
998+ logger .warning (f"Error { e } when calling QdrantDocumentStore.get_metadata_field_min_max()" )
995999 return {}
9961000
1001+
9971002 async def get_metadata_field_min_max_async (self , metadata_field : str ) -> dict [str , Any ]:
9981003 """
9991004 Asynchronously returns the minimum and maximum values for the given metadata field.
@@ -1044,7 +1049,8 @@ async def get_metadata_field_min_max_async(self, metadata_field: str) -> dict[st
10441049 if min_value is not None and max_value is not None :
10451050 return {"min" : min_value , "max" : max_value }
10461051 return {}
1047- except Exception :
1052+ except Exception as e :
1053+ logger .warning (f"Error { e } when calling QdrantDocumentStore.get_metadata_field_min_max_async()" )
10481054 return {}
10491055
10501056 def count_unique_metadata_by_filter (self , filters : dict [str , Any ], metadata_fields : list [str ]) -> dict [str , int ]:
@@ -1098,7 +1104,8 @@ def count_unique_metadata_by_filter(self, filters: dict[str, Any], metadata_fiel
10981104 unique_values_by_field [field ].add (value )
10991105
11001106 return {field : len (unique_values_by_field [field ]) for field in metadata_fields }
1101- except Exception :
1107+ except Exception as e :
1108+ logger .warning (f"Error { e } when calling QdrantDocumentStore.count_unique_metadata_by_filter()" )
11021109 return dict .fromkeys (metadata_fields , 0 )
11031110
11041111 async def count_unique_metadata_by_filter_async (
@@ -1155,7 +1162,8 @@ async def count_unique_metadata_by_filter_async(
11551162 unique_values_by_field [field ].add (value )
11561163
11571164 return {field : len (unique_values_by_field [field ]) for field in metadata_fields }
1158- except Exception :
1165+ except Exception as e :
1166+ logger .warning (f"Error { e } when calling QdrantDocumentStore.count_unique_metadata_by_filter_async()" )
11591167 return dict .fromkeys (metadata_fields , 0 )
11601168
11611169 def get_metadata_field_unique_values (
@@ -1217,7 +1225,8 @@ def get_metadata_field_unique_values(
12171225 break
12181226
12191227 return unique_values [offset : offset + limit ]
1220- except Exception :
1228+ except Exception as e :
1229+ logger .warning (f"Error { e } when calling QdrantDocumentStore.get_metadata_field_unique_values()" )
12211230 return []
12221231
12231232 async def get_metadata_field_unique_values_async (
@@ -1279,7 +1288,8 @@ async def get_metadata_field_unique_values_async(
12791288 break
12801289
12811290 return unique_values [offset : offset + limit ]
1282- except Exception :
1291+ except Exception as e :
1292+ logger .warning (f"Error { e } when calling QdrantDocumentStore.get_metadata_field_unique_values_async()" )
12831293 return []
12841294
12851295 @classmethod
0 commit comments