Menelusuri dengan Elastic App Search
Made by Elastic
Menyinkronkan dokumen dari koleksi Firestore ke Elastic App Search untuk mengaktifkan penelusuran teks lengkap.
Cara kerja ekstensi ini
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
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
- Start an Enterprise Search deployment. You can provision one easily with Elastic Cloud on GCP .
- Once you have a deployment running, you'll need an App Search Engine to sync to your collection.
- 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.
Cara menginstal ekstensi ini
Menggunakan Firebase console
Anda dapat menggunakan Firebase console untuk menginstal dan mengelola ekstensi.
Instal menggunakan konsolMenggunakan Firebase CLI
Anda juga dapat menggunakan Firebase CLI untuk menginstal dan mengelola ekstensi:
Langkah 1: Jalankan perintah npm berikut untuk menginstal CLI atau mengupdate ke versi CLI terbaru.
npm install -g firebase-toolsTidak berhasil? Lihat referensi Firebase CLI atau ubah izin npm Anda.
Langkah 2: Siapkan direktori project Firebase baru atau buka direktori yang sudah ada
Langkah 3: Tambahkan ekstensi ini ke manifes ekstensi Anda dengan menjalankan
firebase ext:install elastic/firestore-elastic-app-search --local --project=projectId_or_alias
Langkah 4 (Opsional): Uji ekstensi ini secara lokal dengan Firebase Emulator Suite
firebase emulators:start
Langkah 5: Deploy ekstensi dalam manifes ke project Anda
firebase deploy --only extensions --project=projectId_or_alias