SearchClient class final

Implemented types
Available extensions

Constructors

SearchClient({required String appId, required String apiKey, ClientOptions options = const ClientOptions()})

Properties

hashCode int
The hash code for this object.
no setterinherited
options ClientOptions
A set of custom client options to configure the behavior of the API client.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

customPost({required String path, Map<String, Object>? parameters, Object? body, RequestOptions? requestOptions}) Future<Object>
This method allow you to send requests to the Algolia REST API.
dispose() → void
Dispose of underlying resources.
override
getRecommendations({required GetRecommendationsParams getRecommendationsParams, RequestOptions? requestOptions}) Future<GetRecommendationsResponse>
Retrieves recommendations from selected AI models.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post({required String path, Map<String, Object>? parameters, Object? body, RequestOptions? requestOptions}) Future<Object>
Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
searchForFacets({required List<SearchForFacets> requests, SearchStrategy? strategy, RequestOptions? requestOptions}) Future<Iterable<SearchForFacetValuesResponse>>

Available on SearchClient, provided by the SearchClientExt extension

Calls the search method but with certainty that we will only request Algolia facets.
searchForHits({required List<SearchForHits> requests, SearchStrategy? strategy, RequestOptions? requestOptions}) Future<Iterable<SearchResponse>>

Available on SearchClient, provided by the SearchClientExt extension

Calls the search method but with certainty that we will only request Algolia records (hits).
searchIndex({required SearchForHits request, RequestOptions? requestOptions}) Future<SearchResponse>

Available on SearchClient, provided by the SearchClientExt extension

Perform a search operation targeting one index.
setClientApiKey({required String apiKey}) → void
Allows to switch the API key used to authenticate requests.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited