search method

Future<SearchResult> search({
  1. Map? query,
  2. int? offset,
  3. int? limit,
  4. List<Object>? fields,
  5. dynamic source,
  6. Map? suggest,
  7. List<Map>? sort,
  8. Map? aggregations,
  9. Duration? scroll,
  10. HighlightOptions? highlight,
  11. bool? trackTotalHits,
  12. int? size,
  13. double? minScore,
})

Search :-)

Implementation

Future<SearchResult> search({
  Map? query,
  // TODO: investigate if/when this should be deprecated in favour of `from`
  int? offset,
  // TODO: investigate if/when this should be deprecated in favour of `size`
  int? limit,
  List<Object>? fields,
  dynamic source,
  Map? suggest,
  List<Map>? sort,
  Map? aggregations,
  Duration? scroll,
  HighlightOptions? highlight,
  bool? trackTotalHits,
  int? size,
  double? minScore,
}) async {
  return await _client.search(
    index: name,
    type: type,
    query: query,
    offset: offset,
    limit: limit,
    fields: fields,
    source: source,
    suggest: suggest,
    sort: sort,
    aggregations: aggregations,
    scroll: scroll,
    highlight: highlight,
    trackTotalHits: trackTotalHits,
    size: size,
    minScore: minScore,
  );
}