search method
Search for documents matching a specific query in the index.
Implementation
Future<Searcheable<Map<String, dynamic>>> search(
String? text, [
SearchQuery? q,
]) async {
final response = await http.postMethod<Map<String, Object?>>(
'/indexes/$uid/search',
data: {
'q': text,
...?q?.toSparseMap(),
},
);
return Searcheable.createSearchResult(response.data!, indexUid: uid);
}