搜尋套件、儲存庫與 APP 分類

套件詳情v1.58.0

algolia_client_search

AlgoliaSearch 庫的一個子套件,提供針對搜尋功能的進階搜尋與發現功能,適用於 Dart/Flutter 應用。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
4.2萬
喜歡數
6
Pub 分數
160

安裝套件

flutter pub add algolia_client_search

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

algolia_client_search 套件是一個 Dart/Flutter 庫,專為將 Algolia 強大的搜尋與發現功能整合到應用程式中而設計。它提供一個乾淨、類型安全的 API,可用於執行搜尋、管理索引,並在多個平台處理自動補全功能。作為 AlgoliaSearch 生態系統的一部分,此套件讓開發者能在 Flutter 應用中提供快速、相關且可擴展的搜尋體驗。該套件支援即時結果、分面篩選和可自訂的排序,非常適合電商、內容發現和應用導航。

適用情境

  • 電子商務產品搜尋
  • 應用中的內容發現
  • 即時自動補全
  • 使用者驅動的篩選
  • 應用導航與搜尋
  • 動態內容索引

主要特色

  • 快速、可擴展的搜尋
  • 支援分面搜尋
  • 自動完成和拼寫容錯
  • 索引管理 API
  • 即時結果更新
  • 類型安全的 Dart 接口

適合對象

  • 需要強大搜尋功能的Flutter應用
  • 使用 Algolia 後端的開發人員
  • 包含大型數據集的應用程式
  • 需要即時搜尋的專案
  • 優先考慮開發者體驗的團隊

使用建議

  • 需要 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.

所屬分類

依賴

依賴清單 4 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。