Execute and return buffered queries given by `add_to_query_buffer`. If multiple query MinHash were added to the query buffer, the intersection of the results of all query MinHash will be returned. Returns: `list` of unique keys.
(self)
| 233 | hashtable.add_to_select_buffer([H]) |
| 234 | |
| 235 | def collect_query_buffer(self): |
| 236 | ''' |
| 237 | Execute and return buffered queries given |
| 238 | by `add_to_query_buffer`. |
| 239 | |
| 240 | If multiple query MinHash were added to the query buffer, |
| 241 | the intersection of the results of all query MinHash will be returned. |
| 242 | |
| 243 | Returns: |
| 244 | `list` of unique keys. |
| 245 | ''' |
| 246 | collected_result_sets = [ |
| 247 | set(collected_result_lists) |
| 248 | for hashtable in self.hashtables |
| 249 | for collected_result_lists in hashtable.collect_select_buffer() |
| 250 | ] |
| 251 | if not collected_result_sets: |
| 252 | return [] |
| 253 | if self.prepickle: |
| 254 | return [pickle.loads(key) for key in set.intersection(*collected_result_sets)] |
| 255 | return list(set.intersection(*collected_result_sets)) |
| 256 | |
| 257 | # def __contains__(self, key): |
| 258 | # ''' |
nothing calls this directly
no test coverage detected