Google 致力于为黑人社区推动种族平等。查看具体举措

使用 Elastic App Search 搜索

Elastic
Made by Elastic

将 Firestore 集合中的文档同步到 Elastic App Search,以启用全文搜索。

此扩展程序的运作方式

The Elastic App Search Firestore extension enables comprehensive full-text search for your Firebase applications.

This extension indexes and syncs the documents in a Cloud Firestore collection to an Elastic App Search deployment by creating a Cloud Function which syncs changes in your collection on any write event (any time you create, update, or a delete a document).

Elastic App Search provides a comprehensive API for implementing common search patterns like auto-completed search suggestions and faceted filter navigation. You'll also have tooling so your team can easily track and tweak search relevance based on usage data.

App Search is a part of Elastic Enterprise Search . You'll need an Enterprise Search deployment, which is created and maintained outside of Firebase.

Getting started

  1. Start an Enterprise Search deployment. You can provision one easily with Elastic Cloud on GCP .
  2. Once you have a deployment running, you'll need an App Search Engine to sync to your collection.
  3. Once you've installed the extension and your Firestore collection is synced to App Search, you're ready to start searching !

You can use the App Search Search API for full-text search and everything you need to build a complete search experience: facets, filters, click analytics, query suggestion, relevance tuning and much more.

If you have documents in your collection already, this extension also provides a script for backfilling existing data to App Search.

Billing

To install an extension, your project must be on the Blaze (pay as you go) plan

  • You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension (even if it is not used).
  • This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service’s free tier:
  • Cloud Functions (Node.js 10+ runtime. See FAQs )
  • Cloud Firestore
  • Cloud Secret Manager

If you host your Elastic Enterprise Search instance on Elastic Cloud, you will also be responsible for charges associated with that service.

Learn more about Elastic Cloud .

如何安装此扩展程序

使用 Firebase 控制台

要安装和管理扩展程序,您可以使用 Firebase 控制台。

使用控制台安装

使用 Firebase CLI

要安装和管理扩展程序,您还可以使用 Firebase CLI:

步骤 1 :运行以下 npm 命令来安装 CLI 或将 CLI 更新到最新版本。

npm install -g firebase-tools
不能运行?请参阅 Firebase CLI 参考文档 或者更改您的 npm 权限

第 2 步 设置一个新的 Firebase 项目目录 或转到现有目录

第 3 步 :将此扩展程序添加到 扩展程序清单

firebase ext:install elastic/firestore-elastic-app-search --local --project=projectId_or_alias

第 4 步(可选) :使用 Firebase Emulator Suite 在本地测试此扩展程序

firebase emulators:start

第 5 步 :将清单中的扩展程序 部署 到项目中

firebase deploy --only extensions --project=projectId_or_alias
支持
Cloud Firestore
作者
许可
Apache-2.0
版本
0.4.1