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-4.9.0 lib/blacklight/solr_response/group.rb
blacklight-4.8.0 lib/blacklight/solr_response/group.rb
blacklight-5.13.0 lib/blacklight/solr_response/group.rb
blacklight-5.11.3 lib/blacklight/solr_response/group.rb
blacklight-5.12.1 lib/blacklight/solr_response/group.rb
blacklight-5.12.0 lib/blacklight/solr_response/group.rb
blacklight-5.10.3 lib/blacklight/solr_response/group.rb
blacklight-5.9.4 lib/blacklight/solr_response/group.rb
blacklight-5.11.2 lib/blacklight/solr_response/group.rb
blacklight-5.11.1 lib/blacklight/solr_response/group.rb
blacklight-5.11.0 lib/blacklight/solr_response/group.rb
blacklight-5.10.2 lib/blacklight/solr_response/group.rb
blacklight-5.10.1 lib/blacklight/solr_response/group.rb
blacklight-5.10.0 lib/blacklight/solr_response/group.rb
blacklight-5.9.3 lib/blacklight/solr_response/group.rb
blacklight-5.9.2 lib/blacklight/solr_response/group.rb
blacklight-5.9.1 lib/blacklight/solr_response/group.rb
blacklight-5.9.0 lib/blacklight/solr_response/group.rb
blacklight-5.8.2 lib/blacklight/solr_response/group.rb
blacklight-5.8.1 lib/blacklight/solr_response/group.rb