lib/picky/bundle_realtime.rb in picky-4.6.0 vs lib/picky/bundle_realtime.rb in picky-4.6.1
- old
+ new
@@ -18,11 +18,14 @@
if ids.empty?
@inverted.delete str_or_sym
@weights.delete str_or_sym
# 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.
+ # In essence, we don't know if and when we can remove it.
+ # (One idea is to add an array of ids and remove from that)
#
@similarity.delete self.similarity_strategy.encode(str_or_sym)
else
@weights[str_or_sym] = self.weight_strategy.weight_for ids.size
end
@@ -90,12 +93,11 @@
self.partial_strategy.each_partial text, &block
end
# Builds the realtime mapping.
#
- # Note: Experimental feature. Might be removed in 4.0.
+ # Note: Experimental feature. Might be removed in 5.0.
#
- # TODO Subset of #add. Rewrite, optimize.
# THINK Maybe load it and just replace the arrays with the corresponding ones.
#
def build_realtime
clear_realtime
@inverted.each_pair do |str_or_sym, ids|