Insert a key to the index, together with a MinHash (or weighted MinHash) of the set referenced by the key. :param str key: The identifier of the set. :param datasketch.MinHash minhash: The MinHash of the set. :param bool check_duplication: To avoid d
(self, key, minhash, check_duplication=True)
| 141 | self._buffer_size = value |
| 142 | |
| 143 | def insert(self, key, minhash, check_duplication=True): |
| 144 | ''' |
| 145 | Insert a key to the index, together |
| 146 | with a MinHash (or weighted MinHash) of the set referenced by |
| 147 | the key. |
| 148 | |
| 149 | :param str key: The identifier of the set. |
| 150 | :param datasketch.MinHash minhash: The MinHash of the set. |
| 151 | :param bool check_duplication: To avoid duplicate keys in the storage (`default=True`). |
| 152 | It's recommended to not change the default, but |
| 153 | if you want to avoid the overhead during insert |
| 154 | you can set `check_duplication = False`. |
| 155 | ''' |
| 156 | self._insert(key, minhash, check_duplication=check_duplication, buffer=False) |
| 157 | |
| 158 | # def insertion_session(self, buffer_size=50000): |
| 159 | # ''' |
no test coverage detected