Firetool

Home / Docs / Search

Docs

Search Firestore data

Find a value in the rows you've already loaded, without reading anything, or look for it in the collections you choose, seeing first what it will read. You need Firetool 4.1 or later.

Search the loaded rows

  1. Open the collections you want to look through, and run their queries (with Load more if you need more rows).
  2. Press Ctrl+K (⌘+K on a Mac) and type at least two letters of the value: part of a name, an email address, an order number.
  3. Matches show under In loaded rows: the matching text, then the field it's in, the document's path and the project. A value inside a map or a list is found too, and so is a document ID. Field names alone don't count: every row of a collection has them.
  4. Choose one to open its tab and the document.

This looks only at rows already loaded in your open tabs, so it reads nothing from Firestore and costs nothing. It shows up to 20 matches, at most 5 from each tab.

Find a value in collections

To look in collections you haven't loaded, Firetool asks Firestore. Firestore can't search every field of every document, so you name the field (or look up a document ID).

  1. Open it from any of these:
    • the command palette: type the value, then choose Find “…” in collections… under the matches, or the action Find a value in collections…;
    • a collection's Actions ▾ → Find a value in collections…;
    • right-click a cell in the table → Find this value in other collections…, which fills in the field and the value.
  2. In Find a value, check the Value and its Type: Auto guesses, or choose Text, Number, True / false or Null. A number stored as text is only found as Text.
  3. Under In the field, type the field's name; use dots for a field inside a map, such as address.city. The fields of the open collection are suggested.
  4. Tick the Collections to search. The open tab's collection is ticked to start; All and None tick or clear them all. Firetool remembers your choices for each project.
  5. Read the line under the list: how many queries it will run, the most documents it may read, and the estimated cost.
  6. Choose Search. With more than one collection ticked, Firetool asks first, with the same numbers. Stop ends a long search after the collection it's on.

It searches the collections at the top of the database, not subcollections. Searching only reads, so it works in the Free edition and with the Viewer role.

Look up a document ID

Choose As a document ID instead of a field, type the ID as the value, and tick the collections. Firetool reads that one document in each collection: one read each, whether it's there or not.

Results

  • Each collection shows how many it found, none, or the error Firestore gave. A field search lists up to 20 matches a collection, with the field's value beside each ID.
  • Choose a document to open it.
  • Open as a query opens the collection in a tab with the filter already set and run, so you can load the rest, edit or export them.
  • When nothing is found, check the field's name and try another Type: 42 stored as text and 42 stored as a number are different values to Firestore.

What it reads

  • The loaded rows: nothing.
  • A field: one query a collection, reading up to 20 matching documents. A query that finds nothing is still billed one read.
  • A document ID: one read a collection.

The reads count in the status bar like any other query, and the policy and roles of the project apply.

Questions

Can Firetool search every field of every document?

No. Firestore has no full-text search: it can only find documents by a field you name. Firetool searches every field of the rows you've already loaded, and looks a value up in a named field, or as a document ID, in the collections you choose.

Does searching cost anything?

Searching the loaded rows from the command palette reads nothing. Find a value runs one query a collection, reading up to 20 documents each (or one read a collection for a document ID), and shows the reads and the estimated cost before it starts.

Why isn't a value I can see found?

Usually the type: a number stored as text is only found with Type set to Text, and the other way round. Also check the field's name, including its case, and that the collection is ticked; subcollections aren't searched.