pub struct SuggestFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to Suggest
.
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.
Implementations§
source§impl SuggestFluentBuilder
impl SuggestFluentBuilder
sourcepub fn as_input(&self) -> &SuggestInputBuilder
pub fn as_input(&self) -> &SuggestInputBuilder
Access the Suggest as a reference.
sourcepub async fn send(
self
) -> Result<SuggestOutput, SdkError<SuggestError, HttpResponse>>
pub async fn send( self ) -> Result<SuggestOutput, SdkError<SuggestError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<SuggestOutput, SuggestError, Self>
pub fn customize( self ) -> CustomizableOperation<SuggestOutput, SuggestError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn query(self, input: impl Into<String>) -> Self
pub fn query(self, input: impl Into<String>) -> Self
Specifies the string for which you want to get suggestions.
sourcepub fn set_query(self, input: Option<String>) -> Self
pub fn set_query(self, input: Option<String>) -> Self
Specifies the string for which you want to get suggestions.
sourcepub fn get_query(&self) -> &Option<String>
pub fn get_query(&self) -> &Option<String>
Specifies the string for which you want to get suggestions.
sourcepub fn suggester(self, input: impl Into<String>) -> Self
pub fn suggester(self, input: impl Into<String>) -> Self
Specifies the name of the suggester to use to find suggested matches.
sourcepub fn set_suggester(self, input: Option<String>) -> Self
pub fn set_suggester(self, input: Option<String>) -> Self
Specifies the name of the suggester to use to find suggested matches.
sourcepub fn get_suggester(&self) -> &Option<String>
pub fn get_suggester(&self) -> &Option<String>
Specifies the name of the suggester to use to find suggested matches.
Trait Implementations§
source§impl Clone for SuggestFluentBuilder
impl Clone for SuggestFluentBuilder
source§fn clone(&self) -> SuggestFluentBuilder
fn clone(&self) -> SuggestFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for SuggestFluentBuilder
impl !RefUnwindSafe for SuggestFluentBuilder
impl Send for SuggestFluentBuilder
impl Sync for SuggestFluentBuilder
impl Unpin for SuggestFluentBuilder
impl !UnwindSafe for SuggestFluentBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more