这是indexloc提供的服务,不要输入任何密码

typesense_search 0.1.1 copy "typesense_search: ^0.1.1" to clipboard
typesense_search: ^0.1.1 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
254
downloads

Publisher

unverified uploader

Weekly Downloads

Dart client library for wrapping the Typesense community library.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

typesense

More

Packages that depend on typesense_search