lib/picky/query/indexes.rb in picky-4.12.1 vs lib/picky/query/indexes.rb in picky-4.12.2
- old
+ new
@@ -11,13 +11,11 @@
# # What it does is take the three given (API-) indexes and
# # bundle them in an index bundle.
#
class Indexes
- delegate :size,
- :first,
- :to => :@indexes
+ forward :size, :first, :to => :@indexes
attr_reader :indexes,
:ignored_categories
# Creates a new Query::Indexes.
@@ -28,24 +26,26 @@
def initialize *indexes
IndexesCheck.check_backends indexes
@indexes = indexes
end
-
- # Ignore the categories with these qualifiers.
+
+ # TODO Reinstate.
#
- # Example:
- # search = Search.new(index1, index2, index3) do
- # ignore :name, :first_name
- # end
- #
- # Note: Cleans up / optimizes after being called.
- #
- def ignore *qualifiers
- @ignored_categories ||= []
- @ignored_categories += qualifiers.map { |qualifier| @mapper.map qualifier }.compact
- @ignored_categories.uniq!
- end
+ # # Ignore the categories with these qualifiers.
+ # #
+ # # Example:
+ # # search = Search.new(index1, index2, index3) do
+ # # ignore :name, :first_name
+ # # end
+ # #
+ # # Note: Cleans up / optimizes after being called.
+ # #
+ # def ignore *qualifiers
+ # @ignored_categories ||= []
+ # @ignored_categories += qualifiers.map { |qualifier| @qualifier_mapper.map qualifier }.compact
+ # @ignored_categories.uniq!
+ # end
# Returns a number of prepared (sorted, reduced etc.) allocations for the given tokens.
#
def prepared_allocations_for tokens, weights = {}, amount = nil
allocations = allocations_for tokens
\ No newline at end of file