Sha256: 7ade271e99f92cf558b9b000216257cddf1cf9cc78d7682efcd49e8e29b1adc8
Contents?: true
Size: 1.09 KB
Versions: 4
Compression:
Stored size: 1.09 KB
Contents
=RSolr::Ext A set of helper methods/modules to assist in building Solr queries and handling responses when using the RSolr library. NOTE: The API for RSolr::Ext is pre 1.0. Things are changing quickly... ==Request Example std = RSolr::Ext::Request::Standard.new solr_params = std.map( :page=>2, :per_page=>10, :phrases=>{:name=>'This is a phrase'}, :filters=>['test', {:price=>(1..10)}], :phrase_filters=>{:manu=>['Apple']}, :q=>'ipod', :facets=>{:fields=>['cat', 'blah']} ) rsolr = RSolr.connect response = rsolr.select(solr_params) ==Response Example rsolr = RSolr.connect raw_response = rsolr.select(:q=>'*:*) r = RSolr::Ext::Response::Standard.new(raw_response) r.ok? r.params r.docs r.docs.previous_page r.docs.next_page r.facets ===Doc Pagination After creating a RSolr::Ext::Response object, pass-in the response.docs to the will_paginate view helper: rsolr = RSolr.connect raw_response = rsolr.select(:q=>'*:*) @response = RSolr::Ext::Response::Standard.new(raw_response) # in view: <%= will_paginate @response.docs %>
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mwmitchell-rsolr-ext-0.5.9 | README.rdoc |
mwmitchell-rsolr-ext-0.5.95 | README.rdoc |
mwmitchell-rsolr-ext-0.6.0 | README.rdoc |
mwmitchell-rsolr-ext-0.6.1 | README.rdoc |