Sha256: 547500d6e65b37edcda67b4d6073d4420460551360f3b85b22db46da2007d1c3

Contents?: true

Size: 404 Bytes

Versions: 2

Compression:

Stored size: 404 Bytes

Contents

module Workarea
  # Checking for SearchSuggestions this way ensures the constant
  # loads, if possible, before deciding whether to decorate.
  if !!(Search::SearchSuggestions rescue nil)
    decorate Search::SearchSuggestions, with: :content_search do
      def query
        super.tap do |query|
          query[:bool][:must_not] = { term: { type: 'content' } }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-content_search-1.1.0 app/queries/workarea/search/search_suggestions.decorator
workarea-content_search-1.0.9 app/queries/workarea/search/search_suggestions.decorator