搜索插件、代码仓与 APP 分类

插件详情v1.55.0

algoliasearch

一个用于 Algolia 的 Dart 包。可在 Dart/Flutter 应用中实现无缝集成,支持即时搜索、拼写容错和用户洞察等功能。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
4万
喜欢数
37
Pub 分数
160

安装插件

flutter pub add algoliasearch

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

algoliasearch 包为将 Algolia 强大的搜索基础设施集成到 Flutter 应用程序中提供了 Dart 客户端。它支持即时、容错拼写错误的搜索,提供实时结果、用户行为洞察和高级筛选功能。该包专为性能和易用性设计,支持所有主要平台,包括移动设备、网页和桌面端。开发者可以快速实现强大的搜索功能,设置简单,同时利用 Algolia 的可扩展后端和丰富的功能集。

适合场景

  • 电子商务应用中的实时搜索
  • 用户活动跟踪以用于分析
  • 媒体平台中的内容发现
  • 搜索时容忍拼写错误
  • 仪表板中的筛选和分类

主要特点

  • 低延迟的即时搜索
  • 拼写容错和自动更正
  • 用户洞察与分析
  • 高级筛选和分类
  • 跨平台支持

适合对象

  • 电子商务应用
  • 内容密集型应用
  • 需要快速搜索的应用程序
  • 以分析为导向的产品
  • 跨平台 Flutter 项目

使用建议

  • 需要一个 Algolia 账户和 API 密钥
  • 依赖外部 Algolia 服务
  • 规模化潜在成本
  • 有限的离线搜索功能
  • 需要网络连接才能实现完整功能

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Algolia for Dart

The perfect starting point to integrate Algolia within your Dart project

Latest version Publisher

Flutter Guide • Community Forum • Stack Overflow • Report a Bug • Support

📚 Description

algoliasearch is a comprehensive Dart package that provides access to Algolia's robust search and insights features. It is an all-in-one solution designed to help you integrate Algolia within your Dart project seamlessly and efficiently.

The package currently offers the following clients:

  • Search Client: Allows you to leverage Algolia's search capabilities, including instant search results, search-as-you-type, and typo-tolerance.
  • Insights Client: Enables you to collect events related to your search and discovery experience, providing valuable insights into user behavior. With it, you can unlock powerful features such as recommendations, personalization, and smarter search results.
  • Search Lite Client: A lighter, search-only version of the library, perfect for projects that require search functionality without the need for features like indexing.

Future updates will include more clients to cover the entirety of Algolia's feature set, providing a complete toolset for building powerful, interactive search experiences in your Dart or Flutter application.

✨ Features

  • Low-Level HTTP Client: Provides a thin and minimal low-level HTTP client to interact directly with Algolia's API, giving you maximum control over your requests.
  • Cross-Platform Compatibility: Designed to work seamlessly on both native and web platforms, making it ideal for any Dart project.
  • Pure Dart Construction: Built with pure Dart for superior performance and maximum compatibility across Dart projects.

💡 Getting Started

Step 1: Add Dependency

To use this package in your project, add it as a dependency:

For Dart projects:
dart pub add algoliasearch
For Flutter projects:
flutter pub add algoliasearch
Step 2: Import the Package

You can now import the Algolia API client in your project and play with it.

import 'package:algolia_client_search/algolia_client_search.dart';
// Alternatively, you can import `algoliasearch_lite`, a **search-only** version of the library, if you do not need the full feature set:
// import 'package:algoliasearch/algoliasearch_lite.dart';

final client = SearchClient(appId: 'YOUR_APP_ID', apiKey: 'YOUR_API_KEY');

// Add a new record to your Algolia index
final response = await client.saveObject(
  indexName: "<YOUR_INDEX_NAME>",
  body: {
    'objectID': "id",
    'test': "val",
  },
);

// Poll the task status to know when it has been indexed
await client.waitTask('<YOUR_INDEX_NAME>', response.taskID);

// Fetch search results, with typo tolerance
final response = await client.search(
  searchMethodParams: SearchMethodParams(
    requests: [
      SearchForHits(
        indexName: "<YOUR_INDEX_NAME>",
        query: "<YOUR_QUERY>",
        hitsPerPage: 50,
      ),
    ],
  ),
);

❓ Troubleshooting

Encountering an issue? Before reaching out to support, we recommend heading to our FAQ where you will find answers for the most common issues and gotchas with the client. You can also open a GitHub issue

Contributing

This repository hosts the code of the generated Algolia API client for Dart, if you'd like to contribute, head over to the main repository. You can also find contributing guides on our documentation website.

📄 License

The Algolia Dart API Client is an open-sourced software licensed under the MIT license.

所属分类

依赖

依赖清单 6 项

源码仓库

使用此插件的项目

暂无相关数据。