Skip to main content

Filter

Aliases: $match, $find

Filters the records to pass only the records that match the specified condition(s) to the next pipeline stage.

Stage as JSON

Single filter:

{
$filter: "blastid==160" // return only records where blastid equals 160
}

Multiple filters in stage:

{
// returns records where:
// (blastid equals 160) AND (segment equals 1 OR 2) AND (us_state equals "AK")
$filter: [
"blastid==160",
"segment in (1,2)",
"us_state=\"AK\""
]
}