Skip to main content
$count returns how many documents contribute a value for a field.

How It Works

  • By default, only documents that have the field are counted.
  • If missing is set, documents without the field also contribute to result.

Compatibility

Field must be FAST.

Arguments

Output