app/models/bento_search/concurrent_searcher.rb
# Call after #search. Blocks until each included engine is finished
# then returns a Hash keyed by engine registered id, value is a
# BentoSearch::Results object.
#
# If called multiple times, returns the same results each time, does
# not re-run searches.
#
# It is an error to invoke without having previously called #search
Call after #search. Blocks until each included engine is finished
then returns a Hash keyed by engine registered id, value is a
BentoSearch::Results object.

If called multiple times, returns the same results each time, does
not re-run searches.

It is an error to invoke without having previously called #search
Call after #search . Blocks until each included engine is finished then returns a Hash keyed by engine registered id value is a BentoSearch :: Results object . If called multiple times returns the same results each time does not re - run searches . It is an error to invoke without having previously called #search
def results
      unless search_started?
        raise ArgumentError, "Can't call ConcurrentSearcher#results before you have executed a #search"
      end
      @results ||= begin
        pairs = rails_wait_wrap do
          @futures.collect { |future| [future.value!.engine_id, future.value!] }
        end
        Hash[ pairs ].freeze
      end
    end
def results unless search_started? raise ArgumentError , "Can't call ConcurrentSearcher#results before you have executed a #search" end @results ||= begin pairs = rails_wait_wrap do @futures . collect { | future | [ future . value! . engine_id , future . value! ] } end Hash [ pairs ] . freeze end end
Call after #search.
Call after #search .