MCPcopy Create free account
hub / github.com/BIT-DataLab/LakeBench / insert

Method insert

join/LSH/datasketch/lsh.py:143–156  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 # '''

Callers 11

minhash_multi_processFunction · 0.95
entity_cellvalues_lshFunction · 0.95
minhash_multi_processFunction · 0.95
lshTest.pyFile · 0.45
minhash_LshFunction · 0.45
_compute_best_partitionsFunction · 0.45
indexMethod · 0.45
index_batchMethod · 0.45
unionMethod · 0.45
index_oldMethod · 0.45
_insertMethod · 0.45

Calls 1

_insertMethod · 0.95

Tested by

no test coverage detected