searchIndex method
Future<SearchResponse>
searchIndex({
- required SearchForHits request,
- RequestOptions? requestOptions,
Perform a search operation targeting one index.
Implementation
Future<SearchResponse> searchIndex({
required SearchForHits request,
RequestOptions? requestOptions,
}) async {
final response = await search(
searchMethodParams: SearchMethodParams(requests: [request]),
requestOptions: requestOptions,
);
return SearchResponse.fromJson(response.results.first);
}