Sha256: 760b20eb329e25924e6bb95b4731c377e9834a3af2ad716d4ba73a4294f747ac

Contents?: true

Size: 580 Bytes

Versions: 75

Compression:

Stored size: 580 Bytes

Contents

# frozen_string_literal: true
class Blacklight::Solr::Response::Group
  include Blacklight::Solr::Response::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

75 entries across 75 versions & 2 rubygems

Version Path
blacklight-7.18.0 lib/blacklight/solr/response/group.rb
blacklight-7.17.2 lib/blacklight/solr/response/group.rb
blacklight-7.17.1 lib/blacklight/solr/response/group.rb
blacklight-7.17.0 lib/blacklight/solr/response/group.rb
blacklight-7.16.0 lib/blacklight/solr/response/group.rb
blacklight-7.15.2 lib/blacklight/solr/response/group.rb
blacklight-7.15.1 lib/blacklight/solr/response/group.rb
blacklight-7.15.0 lib/blacklight/solr/response/group.rb
blacklight-7.14.1 lib/blacklight/solr/response/group.rb
blacklight-7.14.0 lib/blacklight/solr/response/group.rb
blacklight-7.13.2 lib/blacklight/solr/response/group.rb
blacklight-7.13.1 lib/blacklight/solr/response/group.rb
blacklight-7.13.0 lib/blacklight/solr/response/group.rb
blacklight-7.12.1 lib/blacklight/solr/response/group.rb
blacklight-7.12.0 lib/blacklight/solr/response/group.rb
blacklight-7.11.1 lib/blacklight/solr/response/group.rb
blacklight-7.10.0 lib/blacklight/solr/response/group.rb
blacklight-7.9.0 lib/blacklight/solr/response/group.rb
blacklight-7.8.1 lib/blacklight/solr/response/group.rb
blacklight-7.8.0 lib/blacklight/solr/response/group.rb