Add a hash to the batch query
(self, doc_id, score=1.0, replace=False)
| 68 | self.commit() |
| 69 | |
| 70 | def add_document_hash(self, doc_id, score=1.0, replace=False): |
| 71 | """ |
| 72 | Add a hash to the batch query |
| 73 | """ |
| 74 | self.client._add_document_hash( |
| 75 | doc_id, conn=self._pipeline, score=score, replace=replace |
| 76 | ) |
| 77 | self.current_chunk += 1 |
| 78 | self.total += 1 |
| 79 | if self.current_chunk >= self.chunk_size: |
| 80 | self.commit() |
| 81 | |
| 82 | def commit(self): |
| 83 | """ |
nothing calls this directly
no test coverage detected