Sha256: 577afe0f0f68b76730bcd9d4d4224a35a08bfe869b9c3118533e09b02478980c

Contents?: true

Size: 611 Bytes

Versions: 1

Compression:

Stored size: 611 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 highlights_for(doc)
        @search.highlights_for(doc)
      end

      def solr_docs
        @doclist['docs']
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sunspot-2.0.0.pre.111215 lib/sunspot/search/group.rb