lib/elastic/app-search/api/query_suggestion.rb in elastic-enterprise-search-7.14.1 vs lib/elastic/app-search/api/query_suggestion.rb in elastic-enterprise-search-7.15.0
- old
+ new
@@ -19,23 +19,23 @@
module Elastic
module EnterpriseSearch
module AppSearch
module Actions
- # Querysuggestion - Provide relevant query suggestions for incomplete queries
+ # QuerySuggestion - Retrieve query suggestions
+ # Provide relevant query suggestions for incomplete queries
#
- # @param engine_name [String] (*Required*)
+ # @param engine_name [String] Name of the engine (*Required*)
# @param arguments [Hash] endpoint arguments
- # @option arguments [String] :query A partial query for which to receive suggestions (*Required*)
- # @option arguments [Array] :fields List of fields to use to generate suggestions. Defaults to all text fields
- # @option arguments [Integer] :size Number of query suggestions to return. Must be between 1 and 20. Defaults to 5
- # @option arguments [Hash] :body The request body
+ # @option arguments [Hash] :body
+ # @option body [String] :query
+ # @option body :types
+ # @option body [Integer] :size
# @option arguments [Hash] :headers optional HTTP headers to send with the request
#
# @see https://www.elastic.co/guide/en/app-search/current/query-suggestion.html
#
def query_suggestion(engine_name, arguments = {})
- raise ArgumentError, "Required parameter 'query' missing" unless arguments[:query]
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
body = arguments.delete(:body) || {}
headers = arguments.delete(:headers) || {}