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
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.
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';
voidmain() async {
// Replace with your configurationfinal 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: constDuration(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