lib/picky/search.rb in picky-4.0.0 vs lib/picky/search.rb in picky-4.0.1

- old
+ new

@@ -17,11 +17,12 @@ include API::Search::Boost include Helpers::Measuring - attr_reader :indexes + attr_reader :indexes, + :ignore_unassigned attr_accessor :tokenizer, :boosts delegate :ignore, :to => :indexes @@ -42,11 +43,10 @@ instance_eval(&Proc.new) if block_given? @tokenizer ||= Tokenizer.searching # THINK Not dynamic. Ok? @boosts ||= Query::Boosts.new - @ignore_unassigned = false if @ignore_unassigned.nil? self end # Defines tokenizer options or the tokenizer itself. @@ -154,17 +154,17 @@ # # False by default. # # Example: # search = Search.new(books_index, dvd_index, mp3_index) do - # ignore_unassigned_tokens true + # ignore_unassigned_tokens # end # - # With this set to true, if in "Peter Flunder", "Flunder" + # With this set (to true), if in "Peter Flunder", "Flunder" # couldn't be assigned to any category, it will simply be # ignored. This is done for each categorization. # - def ignore_unassigned_tokens value + def ignore_unassigned_tokens value = true @ignore_unassigned = value end # This is the main entry point for a query. # Use this in specs and also for running queries. \ No newline at end of file