searchForFacets method
Future<Iterable<SearchForFacetValuesResponse> >
searchForFacets({
- required List<
SearchForFacets> requests, - SearchStrategy? strategy,
- RequestOptions? requestOptions,
Calls the search
method but with certainty that we will only request
Algolia facets.
Implementation
Future<Iterable<SearchForFacetValuesResponse>> searchForFacets({
required List<SearchForFacets> requests,
SearchStrategy? strategy,
RequestOptions? requestOptions,
}) async {
final request = SearchMethodParams(requests: requests, strategy: strategy);
return search(searchMethodParams: request, requestOptions: requestOptions)
.then((res) =>
res.results.map((e) => SearchForFacetValuesResponse.fromJson(e)));
}