@@ -61,15 +61,15 @@ def _truncate(self, obj, max_items=2):
6161
6262
6363@dataclass
64- class CompositeQueryResults :
64+ class QueryNamespacesResults :
6565 usage : Usage
6666 matches : List [ScoredVectorWithNamespace ]
6767
6868 def __getitem__ (self , key ):
6969 if hasattr (self , key ):
7070 return getattr (self , key )
7171 else :
72- raise KeyError (f"'{ key } ' not found in CompositeQueryResults " )
72+ raise KeyError (f"'{ key } ' not found in QueryNamespacesResults " )
7373
7474 def __repr__ (self ):
7575 return json .dumps (
@@ -110,7 +110,7 @@ def __init__(self, top_k: int):
110110 self .insertion_counter = 0
111111 self .is_dotproduct = None
112112 self .read = False
113- self .final_results : Optional [CompositeQueryResults ] = None
113+ self .final_results : Optional [QueryNamespacesResults ] = None
114114
115115 def _is_dotproduct_index (self , matches ):
116116 # The interpretation of the score depends on the similar metric used.
@@ -160,7 +160,7 @@ def add_results(self, results: Dict[str, Any]):
160160 else :
161161 self ._process_matches (matches , ns , self ._non_dotproduct_heap_item )
162162
163- def get_results (self ) -> CompositeQueryResults :
163+ def get_results (self ) -> QueryNamespacesResults :
164164 if self .read :
165165 if self .final_results is not None :
166166 return self .final_results
@@ -169,7 +169,7 @@ def get_results(self) -> CompositeQueryResults:
169169 raise ValueError ("Results have already been read. Cannot get results again." )
170170 self .read = True
171171
172- self .final_results = CompositeQueryResults (
172+ self .final_results = QueryNamespacesResults (
173173 usage = Usage (read_units = self .usage_read_units ),
174174 matches = [
175175 ScoredVectorWithNamespace (heapq .heappop (self .heap )) for _ in range (len (self .heap ))
0 commit comments