import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CloudSearchDomainClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudSearchDomainClient"; import type { SuggestRequest, SuggestResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link SuggestCommand}. */ export interface SuggestCommandInput extends SuggestRequest { } /** * @public * * The output of {@link SuggestCommand}. */ export interface SuggestCommandOutput extends SuggestResponse, __MetadataBearer { } declare const SuggestCommand_base: { new (input: SuggestCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: SuggestCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Retrieves autocomplete suggestions for a partial query string. You can use suggestions enable you to display likely matches before users finish typing. In Amazon CloudSearch, suggestions are based on the contents of a particular text field. When you request suggestions, Amazon CloudSearch finds all of the documents whose values in the suggester field start with the specified query string. The beginning of the field must match the query string to be considered a match.

*

For more information about configuring suggesters and retrieving suggestions, see Getting Suggestions in the Amazon CloudSearch Developer Guide.

* *

The endpoint for submitting Suggest requests is domain-specific. You submit suggest requests to a domain's search endpoint. To get the search endpoint for your domain, use the Amazon CloudSearch configuration service DescribeDomains action. A domain's endpoints are also displayed on the domain dashboard in the Amazon CloudSearch console.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CloudSearchDomainClient, SuggestCommand } from "@aws-sdk/client-cloudsearch-domain"; // ES Modules import * // const { CloudSearchDomainClient, SuggestCommand } = require("@aws-sdk/client-cloudsearch-domain"); // CommonJS import * // import type { CloudSearchDomainClientConfig } from "@aws-sdk/client-cloudsearch-domain"; * const config = {}; // type is CloudSearchDomainClientConfig * const client = new CloudSearchDomainClient(config); * const input = { // SuggestRequest * query: "STRING_VALUE", // required * suggester: "STRING_VALUE", // required * size: Number("long"), * }; * const command = new SuggestCommand(input); * const response = await client.send(command); * // { // SuggestResponse * // status: { // SuggestStatus * // timems: Number("long"), * // rid: "STRING_VALUE", * // }, * // suggest: { // SuggestModel * // query: "STRING_VALUE", * // found: Number("long"), * // suggestions: [ // Suggestions * // { // SuggestionMatch * // suggestion: "STRING_VALUE", * // score: Number("long"), * // id: "STRING_VALUE", * // }, * // ], * // }, * // }; * * ``` * * @param SuggestCommandInput - {@link SuggestCommandInput} * @returns {@link SuggestCommandOutput} * @see {@link SuggestCommandInput} for command's `input` shape. * @see {@link SuggestCommandOutput} for command's `response` shape. * @see {@link CloudSearchDomainClientResolvedConfig | config} for CloudSearchDomainClient's `config` shape. * * @throws {@link SearchException} (client fault) *

Information about any problems encountered while processing a search request.

* * @throws {@link CloudSearchDomainServiceException} *

Base exception class for all service exceptions from CloudSearchDomain service.

* * * @public */ export declare class SuggestCommand extends SuggestCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: SuggestRequest; output: SuggestResponse; }; sdk: { input: SuggestCommandInput; output: SuggestCommandOutput; }; }; }