search 0.3.0 copy "search: ^0.3.0" to clipboard
search: ^0.3.0 copied to clipboard

unlisted

A small search engine middleware for 'package:database'. Meant for applications that want to do basic searches without an external search engine like ElasticSearch/Lucene.

example/example.dart

import 'package:database/database.dart';
import 'package:search/search.dart';

void main() async {
  // Set default database
  final database = SearcheableDatabase(
    master: MemoryDatabaseAdapter(),
    isReadOnly: true,
  ).database();

  // Search items
  final collection = database.collection('employee');
  final response = await collection.search(
    query: Query.parse('"software developer" (dart OR javascript)'),
  );

  // Print items
  for (var snapshot in response.snapshots) {
    print('Document ID: ${snapshot.document.documentId}');
  }
}
23
likes
30
pub points
57%
popularity

Publisher

verified publisherdint.dev

A small search engine middleware for 'package:database'. Meant for applications that want to do basic searches without an external search engine like ElasticSearch/Lucene.

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

charcode, database, meta

More

Packages that depend on search