Search

Command Types

There are 3 primary types of commands.

  • Source commands produce a stream of events on their own. They must be used as the first command in a search.
    • These commands will spawn a pool of workers to perform operations in parallel
  • Stage commands perform an operation on a single event
    • These commands will not spawn any additional workers
  • Blocking commands aggregate multiple events into a single event. These commands may block the stream of events until they have enough data to produce an output event.
    • These commands will spawn a pool of workers to perform operations in parallel

How commands are executed

Source commands

Source commands are always the first command to be executed in a search. These commands will typically spawn a pool of workers to handle concurrent operations such as reading events from multiple buckets at once.

Stage commands

Stage commands operate on a single event at once and don't require any synchronisation or buffering. These commands do not have workers and instead are merged into a closure that is then executed by the preceding source or blocking command. This means that a search with many stage commands can be executed as a single (nested) function call per event.

Blocking commmands

Blocking commands require buffering or synchronisation during exeuction, they will typically spawn a pool of workers to handle concurrent operations