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

unlistedoutdated

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(
    database: MemoryDatabase(),
    isReadOnly: true,
  );

  // 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
32%
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