Simple Search Action

Using this action, you can search from the Firestore collection, list of documents, and list of strings. This action returns the result in a variable named 'Simple Search Results,' which you can use to populate any scrollable widget such as ListView and GirdView.

A simple search is performed on the user's device after reading the entire collection. This is only suitable for a small collection. Searching for a larger collection can be slow and expensive. For larger collections, it's best to use Aloglia or other search services.

There are three types of search you can add to the page:

  1. Firestore collection: Use this to search from the Firestore collection.

  2. Documents: Use this to search from the list of documents stored in a variable.

  3. Strings: Use this to search from the list of strings stored in a variable such as app or page state variable.

Adding Simple Search action

Follow the steps below to add this action to any widget.

  1. Select the Widget (e.g., Button) on which you want to define the action.

  2. Select Actions from the Properties panel (the right menu), and click Open. This will open an Action Flow Editor in a new popup window.

    1. Click on the + Add Action.

    2. On the right side, search and select the Simple Search action.

    3. Select the Search Type among the Firestore Collection, Documents, and Strings.

    4. If you select the Firestore Collection:

      1. Set the Collection to the one that you want to search from.

      2. Select Searchable Fields to the field that you want to perform the search on.

    5. If you select the Documents:

      1. Set the Source to the variable that holds the list of documents. For example, the result of the query at a top-level widget such as Page or Column

      2. Select Searchable Fields to the field that you want to perform the search on.

    6. If you select the Strings:

      1. Set the Source to the variable that holds the list of strings (e.g., app or page state variable).

    7. Inside the Search Term section, set Widget State > TextField (where users enter a search term).

Last updated