typesense 0.1.1
typesense: ^0.1.1 copied to clipboard
Dart client library for accessing the HTTP API of Typesense search engine.
example/example.md
import 'dart:io';
import 'package:typesense/typesense.dart';
void main() async {
final host = InternetAddress.loopbackIPv4.address;
final config = Configuration(
// Replace with your configuration
nodes: {
Node(
host: host,
port: 7108,
protocol: 'http',
),
Node(
host: host,
port: 8108,
protocol: 'http',
),
Node(
host: host,
port: 9108,
protocol: 'http',
),
},
apiKey: 'xyz',
numRetries: 3, // A total of 4 tries (1 original try + 3 retries)
connectionTimeout: Duration(seconds: 2),
);
final client = Client(config);
await client.collections.retrieve();
}
For an exhaustive list of examples, visit typesense-dart/example/console-simple/