# File lib/sup/ferret_index.rb, line 177 def num_results_for query={} return 0 if empty? # otherwise ferret barfs ###TODO: remove this once my ferret patch is accepted ferret_query = build_ferret_query query @index_mutex.synchronize { @index.search(ferret_query, :limit => 1).total_hits } end