Sha256: 070881f7db21989a2ad7362053561bf32401a09feec6d158e08a33ade9de19cf
Contents?: true
Size: 685 Bytes
Versions: 36
Compression:
Stored size: 685 Bytes
Contents
module SearchFlip # The SearchFlip::Sortable mixin provides the chainable #explain method to # control elasticsearch query explanations module Explainable def self.included(base) base.class_eval do attr_accessor :explain_value end end # Specifies whether or not to enable explanation for each hit on how # its score was computed. # # @example # CommentIndex.explain(true) # # @param value [Boolean] The value for explain # # @return [SearchFlip::Criteria] A newly created extended criteria def explain(value) fresh.tap do |criteria| criteria.explain_value = value end end end end
Version data entries
36 entries across 36 versions & 1 rubygems