Sha256: bdc0b74c274d8b6f7e55b33467637802dd99d986902bc180f1c7943d0b1e05ad

Contents?: true

Size: 550 Bytes

Versions: 55

Compression:

Stored size: 550 Bytes

Contents

class Blacklight::SolrResponse::Group

  include Blacklight::SolrResponse::PaginationMethods

  attr_reader :key, :group, :response
  
  def initialize key, group, response
    @key = key
    @group = group
    @response = response
  end

  def doclist
    group[:doclist]
  end

  # short cut to response['numFound']
  def total
    doclist[:numFound].to_s.to_i
  end
    
  def start
    doclist[:start].to_s.to_i
  end

  def docs
    doclist[:docs].map {|doc| SolrDocument.new(doc, response)}
  end

  def field
    response.group_field
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
blacklight-5.8.0 lib/blacklight/solr_response/group.rb
blacklight-5.7.2 lib/blacklight/solr_response/group.rb
blacklight-5.5.4 lib/blacklight/solr_response/group.rb
blacklight-5.7.1 lib/blacklight/solr_response/group.rb
blacklight-5.7.0 lib/blacklight/solr_response/group.rb
blacklight-5.6.0 lib/blacklight/solr_response/group.rb
blacklight-5.5.3 lib/blacklight/solr_response/group.rb
blacklight-5.5.2 lib/blacklight/solr_response/group.rb
blacklight-5.5.1 lib/blacklight/solr_response/group.rb
blacklight-5.5.0 lib/blacklight/solr_response/group.rb
blacklight-5.4.0 lib/blacklight/solr_response/group.rb
blacklight-5.4.0.rc1 lib/blacklight/solr_response/group.rb
blacklight-5.3.0 lib/blacklight/solr_response/group.rb
blacklight-5.0.3 lib/blacklight/solr_response/group.rb
blacklight-5.1.1 lib/blacklight/solr_response/group.rb
blacklight-5.2.0 lib/blacklight/solr_response/group.rb
blacklight-5.1.0 lib/blacklight/solr_response/group.rb
blacklight-5.0.2 lib/blacklight/solr_response/group.rb
blacklight-5.0.1 lib/blacklight/solr_response/group.rb
blacklight-5.0.0 lib/blacklight/solr_response/group.rb