Sha256: 6e885ac0bc01bf6a421f161a561c589078d462120fa9dd807f592695311bbcf5
Contents?: true
Size: 1.08 KB
Versions: 2
Compression:
Stored size: 1.08 KB
Contents
=RSolrExt A set of helper methods/modules to assist in building Solr queries and handling responses for RSolr. ==Examples ===Params params = RSolrExt::Params.create_fielded_queries(:name=>'a string...', :cat=>[:one, :two]) params == ['name:"a string..."', 'cat:"one"', 'cat:"two"'] The params hash can then be passed into RSolr for fielded querying. ===Base solr_hash = {} # an evaluated solr (ruby) response hash response = RSolrExt::Response::Base.create(solr_hash) ===Select solr_hash = {} # an evaluated solr (ruby) response hash response = RSolrExt::Response::Select.create(solr_hash) response.docs.each do |d| puts d[:cat] end puts response.facets.inspect ====Pagination When using the RSolrExt::Response::Select extension, pagination becomes very easy. In your view (using will_paginate): <%= will_paginate(response) %> ===Update solr_hash = {} # an evaluated solr (ruby) response hash response = RSolrExt::Response::Update.create(solr_hash) ===Luke solr_hash = {} # an evaluated solr (ruby) response hash response = RSolrExt::Response::Luke.create(solr_hash)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mwmitchell-rsolr_ext-0.2.0 | README.rdoc |
mwmitchell-rsolr_ext-0.3.0 | README.rdoc |