パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.6.0

typesense

Typesense サーチエンジンの HTTP API にアクセスするための Dart クライアントライブラリ。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
7810
いいね数
61
Pub ポイント
130

パッケージをインストール

flutter pub add typesense

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

HTTP API を介して Typesense 検索エンジンとシームレスに統合できる Dart クライアントライブラリです。検索操作、コレクションの管理、および Android、iOS、Web、macOS、Windows、Linux など複数のプラットフォームでのドキュメントのインデックス化を簡単に行う方法を提供します。Flutter アプリケーションで高速かつスペルミスに強い検索機能を実現したい開発者向けに設計されており、低レベルの HTTP 操作を抽象化しつつも、柔軟性とパフォーマンスを維持しています。

用途

  • Flutterアプリでのリアルタイム検索
  • スペルミスの許容を備えた全文検索
  • ドキュメントコレクションのインデックス作成と管理
  • オートコンプリート機能の構築
  • 既存のTypesenseサーバーとの統合
  • モバイルおよびウェブアプリケーション内で検索

主な機能

  • 型安全な API ラッパー
  • クロスプラットフォーム互換性
  • 検索、インデックス作成およびスキーマ管理のサポート
  • Flutter pubによる簡単なセットアップ
  • 組み込みエラー処理
  • 軽量で効率的

適している対象

  • Typesense を使用する Flutter 開発者
  • 高速検索機能を必要とするアプリ
  • クロスプラットフォーム検索が必要なプロジェクト
  • 外部検索エンジンを統合する開発者
  • 検索中心のユーザーインターフェースを構築するチーム

注意事項

  • 実行中の Typesense サーバーが必要です
  • HTTP API 機能に制限されています
  • オフライン検索のサポートなし
  • ネットワーク接続に依存します
  • 複雑なクエリロジックの手動処理
  • ローカルのみの検索ニーズには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Typesense

pub package github actions status pub likes pub points pub downloads

Dart client library for accessing the HTTP API of Typesense search engine.

Note: This package is still under development. Some existing APIs might change or new APIs might be available in the future.

Installation

Add typesense as a dependency in your pubspec.yaml file.

dependencies:
  typesense: ^0.6.0

Usage

Read the documentation here: https://typesense.org/docs/api/

Tests are also a good place to know how the library works internally: test

Note: When using this library in a user-facing app, please be sure to use an API Key that only allows search operations instead of the master API key. See keys.dart for an example of how to generate a search only API key.

See Configuration class for a list of all client configuration options.

Examples
import 'dart:io';

import 'package:typesense/typesense.dart';


void main() async {
  // Replace with your configuration
  final host = InternetAddress.loopbackIPv4.address, protocol = Protocol.http;
  final config = Configuration(
    // Api key
    'xyz',
    nodes: {
      Node(
        protocol,
        host,
        port: 7108,
      ),
      Node.withUri(
        Uri(
          scheme: 'http',
          host: host,
          port: 8108,
        ),
      ),
      Node(
        protocol,
        host,
        port: 9108,
      ),
    },
    numRetries: 3, // A total of 4 tries (1 original try + 3 retries)
    connectionTimeout: const Duration(seconds: 2),
  );

  final client = Client(config);

  final searchParameters = {
    'q': 'stark',
    'query_by': 'company_name',
    'filter_by': 'num_employees:>100',
    'sort_by': 'num_employees:desc'
  };

  await client.collection('companies').documents.search(searchParameters);
}

The examples that walk you through on how to use the client: main.dart

Make sure to README beforehand.

Compatibility

Typesense Server typesense-dart
>= v30.0 >= v0.6.0
>= v0.24.0 >= v0.5.0
>= v0.22.0 >= v0.3.0
>= v0.21.0 >= v0.1.1

Contributing

Visit CONTRIBUTING.md

Credits

This library is authored and maintained by our awesome community of contributors:

カテゴリー

依存関係

依存関係一覧 2 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。