typesense_search 0.1.2 copy "typesense_search: ^0.1.2" to clipboard
typesense_search: ^0.1.2 copied to clipboard

Dart client library for wrapping the Typesense community library.

example/example.md

import 'dart:io';

import 'package:typesense/typesense.dart';


void main() async {
  final host = InternetAddress.loopbackIPv4.address, protocol = Protocol.http;
  final nodes = {
      Node(
        protocol,
        host,
        port: 7108,
      ),
      Node.withUri(
        Uri(
          scheme: 'http',
          host: host,
          port: 8108,
        ),
      ),
      Node(
        protocol,
        host,
        port: 9108,
      ),
    };

    final typesenseSearch = TypesenseSearch.withNodes(
        apiKey: "xyz",
        nodes: nodes,
        numRetries: 3,
        connectionTimeout: const Duration(seconds: 2),
    );
    
    final parameters = Parameters(
        query: 'marg',
        queryBy: 'name',
        sortBy: 'name:asc',
    );
  
  await typesenseSearch.search<String>("drinks", parameters, fromJson: (json) => json["name"]);
}
1
likes
140
points
113
downloads

Publisher

unverified uploader

Weekly Downloads

Dart client library for wrapping the Typesense community library.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

typesense

More

Packages that depend on typesense_search