Skip to content

Files

Latest commit

73e34e2 · Feb 14, 2023

History

History
This branch is 84 commits behind firebase/functions-samples:main.

fulltext-search-firestore

README.md

Full Text search

This template shows how to enable full text search on Firestore documents by using one of the followning hosted search services:

Functions Code

See file functions/index.js for the code.

The dependencies are listed in functions/package.json.

Sample Firestore Structure

As an example we'll be using a secure note structure:

/notes
    /note-123456
        text: "This is my first note...",
        owner: "FIREBASE_USER_ID"
    /note-123457
        text: "This is my second note entry...",
        owner: "FIREBASE_USER_ID"
        tags: ["some_category"]

Whenever a new note is created or modified a Function sends the content to be indexed.

Setting up the sample

For setup and overview, please see the Full Text Search Solution in the Firestore documentation.