lib/picky/indexed/bundle_realtime.rb in picky-3.1.11 vs lib/picky/indexed/bundle_realtime.rb in picky-3.1.12
- old
+ new
@@ -19,10 +19,12 @@
encoded = self.similarity_strategy.encoded sym
if ids.empty?
@inverted.delete sym
@weights.delete sym
- @similarity.delete encoded # Since no element uses this sym anymore, we can delete the similarity for it.
+ # Since no element uses this sym anymore, we can delete the similarity for it.
+ # TODO Not really. Since multiple syms can point to the same encoded.
+ @similarity.delete encoded
else
@weights[sym] = self.weights_strategy.weight_for ids.size
end
end
\ No newline at end of file