Sha256: 1f354de33a413ae222e3c5c8f9f98dc7c0e528488830ef753923f5a5f4522209
Contents?: true
Size: 939 Bytes
Versions: 8
Compression:
Stored size: 939 Bytes
Contents
require 'sunspot/search/hit_enumerable' module Sunspot module Search class Group attr_reader :value include HitEnumerable def initialize(value, doclist, search) @value, @doclist, @search = value, doclist, search end def hits(options = {}) if options[:verify] super else @hits ||= super end end def verified_hits @verified_hits ||= super end def results @results ||= verified_hits.map { |hit| hit.instance } end def highlights_for(doc) @search.highlights_for(doc) end def solr_docs @doclist['docs'] end # # The total number of documents matching the query for this group # # ==== Returns # # Integer:: Total matching documents # def total @doclist['numFound'] end end end end
Version data entries
8 entries across 8 versions & 2 rubygems