lib/rsolr-ext/findable.rb in mwmitchell-rsolr-ext-0.7.12 vs lib/rsolr-ext/findable.rb in mwmitchell-rsolr-ext-0.7.31
- old
+ new
@@ -32,10 +32,10 @@
# find 'jefferson', :phrase_filters=>{:type=>'book'} # q=jefferson&fq=type:"book" - all docs
# find {:q=>'something'}, :include_response=>true # q=something -- the entire response
def find(*args, &blk)
mode, solr_params, opts = extract_find_opts!(*args)
- opts[:include_response] = false unless opts.key?(:include_response)
+ opts[:include_response] ||= true
solr_params[:rows] = 1 if mode == :first
valid_solr_params = RSolr::Ext.map_params(solr_params)
response = opts[:handler] ? send_request(opts[:handler], valid_solr_params) : select(valid_solr_params)
\ No newline at end of file