Sha256: de4f368971b8b6bf5f57914a84f3625908d4bcfa70816ed3a1525bef841ed4d5
Contents?: true
Size: 592 Bytes
Versions: 30
Compression:
Stored size: 592 Bytes
Contents
require "rsolr" require "forwardable" module Ddr::Index # # Wraps an RSolr connection # class Connection module Methods extend Forwardable delegate [:get, :paginate] => :solr def solr RSolr.connect(ActiveFedora.solr_config) end def select(params, extra={}) Response.new get("select", params: params.merge(extra)) end def page(*args) Response.new paginate(*args) end def count(params) select(params, rows: 0).num_found end end extend Methods include Methods end end
Version data entries
30 entries across 30 versions & 1 rubygems