fullTextSearch method

List<Map<String, dynamic>> fullTextSearch(
  1. String query
)

Implementation

List<Map<String, dynamic>> fullTextSearch(String query) {
  final results = <Map<String, dynamic>>[];
  for (final document in collection.values) {
    for (final field in document.keys) {
      final value = document[field];
      if (value is String && value.contains(query)) {
        results.add(document);
        break;
      }
    }
  }
  return results;
}