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 lets you 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>
Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the searchForHits or searchForFacets helper to simplify the response format.
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