Sha256: 6018d3c73b9e96f539c14ed73c41cb40895b5f98e832d9e73832175863292a34

Contents?: true

Size: 553 Bytes

Versions: 95

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  class SuggestSearch
    attr_reader :request_params, :repository

    ##
    # @param [Hash] params
    # @param [Blacklight::AbstractRepository] repository
    def initialize(params, repository)
      @request_params = { q: params[:q] }
      @repository = repository
    end

    ##
    # For now, only use the q parameter to create a
    # Blacklight::Suggest::Response
    # @return [Blacklight::Suggest::Response]
    def suggestions
      repository.suggestions(request_params)
    end
  end
end

Version data entries

95 entries across 94 versions & 2 rubygems

Version Path
blacklight-8.6.1 app/models/blacklight/suggest_search.rb
blacklight-7.40.0 app/models/blacklight/suggest_search.rb
blacklight-8.6.0 app/models/blacklight/suggest_search.rb
blacklight-8.5.1 app/models/blacklight/suggest_search.rb
blacklight-8.5.0 app/models/blacklight/suggest_search.rb
blacklight-7.39.0 app/models/blacklight/suggest_search.rb
blacklight-8.4.0 app/models/blacklight/suggest_search.rb
blacklight-7.38.0 app/models/blacklight/suggest_search.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/app/models/blacklight/suggest_search.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/app/models/blacklight/suggest_search.rb
blacklight-8.3.0 app/models/blacklight/suggest_search.rb
blacklight-8.2.2 app/models/blacklight/suggest_search.rb
blacklight-8.2.1 app/models/blacklight/suggest_search.rb
blacklight-8.2.0 app/models/blacklight/suggest_search.rb
blacklight-7.37.0 app/models/blacklight/suggest_search.rb
blacklight-7.36.2 app/models/blacklight/suggest_search.rb
blacklight-7.36.1 app/models/blacklight/suggest_search.rb
blacklight-7.36.0 app/models/blacklight/suggest_search.rb
blacklight-7.35.0 app/models/blacklight/suggest_search.rb
blacklight-8.1.0 app/models/blacklight/suggest_search.rb