FIRESTORE / QUERY MATCHERAN ANIMATED LOOK INSIDE

One document. All the right queries.

New document/messages/m42
{
priority:"normal",
sender:"Carlos",
text:"Hello!",
time:2500
}
01THE CHANGE

A document arrives.

The queries are already indexed. Now the document comes to them.

Compare field names · at root
Document fields
Trie children

Match the document

Tap any node or query to pause and inspect. Tap a field to choose its interval tree.

01 Field prefix trie

Shared fields,
shared lookup paths.

02 Interval tree · sender

Look up("Carlos")
Each node stores an interval and its query IDs.

03 Listening queries

    Matches will collect here.
    Walk ordered document fields and trie children together. Only shared field names lead to interval lookups.