Method: ActsAsSolr::ClassMethods#find_id_by_solr
- Defined in:
- lib/acts_as_solr/class_methods.rb
#find_id_by_solr(query, options = {}) ⇒ Object
Finds instances of a model and returns an array with the ids:
Book.find_id_by_solr "rails" => [1,4,7]
The options accepted are the same as find_by_solr
120 121 122 123 |
# File 'lib/acts_as_solr/class_methods.rb', line 120 def find_id_by_solr(query, ={}) data = parse_query(query, ) return parse_results(data, {:format => :ids}) end |