Atlas only. This operation requires MongoDB Atlas M10 or above. It is not available on self-hosted MongoDB, MongoDB Community Edition, or shared-tier Atlas clusters (M0, M2, M5).
When to Use
- Pre-deployment index verification: A CI/CD deployment workflow checks whether required Atlas Search indexes exist on target collections before deploying a new application version that relies on
$search queries. If any index is missing or in PENDING state, the workflow fails fast and notifies the engineering team rather than deploying broken search functionality.
- Index status polling after creation: After searchindex/create creates a new index, use searchindex/list in a Loop node with a Delay node to poll the index status until it transitions from
PENDING or BUILDING to READY. Gate downstream operations on the index being available.
- Infrastructure audit reporting: A weekly scheduled workflow lists all Atlas Search indexes across multiple collections and databases, compiles the results into a JSON report, and sends it to the platform team. Detects orphaned indexes (no longer used by any query) and indexes stuck in
FAILED state.
- Definition drift detection: Compare the listed index definitions against a reference schema stored in a version-controlled document. If any index definition differs from the expected schema, trigger an alert or auto-update workflow using searchindex/update.
- Search feature gating: At the start of a search workflow, check whether the required search index exists and is in
READY state. If not, fall back to a standard document/find query while triggering an index creation workflow in parallel.
Configuration
Connection
| Field | Required | Description |
ConnectionUri | Required | MongoDB Atlas connection string. Reference via {{ $credentials.mongodbAtlas }}. |
Database | Required | Database name containing the target collection. |
Collection | Required | Collection name to list Atlas Search indexes for. |
This operation has no additional configuration parameters. All fields are connection-level.
Sample Configuration
{
"resource": "search-index",
"operation": "list",
"ConnectionUri": "{{ $credentials.mongodbAtlas }}",
"Database": "ecommerce",
"Collection": "products"
}
Validation Errors
| Error | Cause |
connectionUri is required | ConnectionUri is empty or not provided. |
database is required | Database field is empty. |
collection is required | Collection field is empty. |
Output — Success Port
| Field | Type | Description |
count | integer | Number of Atlas Search indexes defined on the collection. 0 if no indexes exist. |
indexes | array | Array of index descriptor objects, one per defined index. Each object includes at minimum: name (string), status (string — READY, PENDING, BUILDING, FAILED), and definition (object with the full index mapping). May also include id and queryable fields. |
status | string | Always "success". |
resource | string | Always "search-index". |
operation | string | Always "list". |
Sample Output
{
"count": 2,
"indexes": [
{
"id": "64f2a0e1c3b4d5e6f7a8b901",
"name": "product_search",
"status": "READY",
"queryable": true,
"definition": {
"mappings": {
"dynamic": false,
"fields": {
"name": { "type": "string", "analyzer": "lucene.standard" },
"description": { "type": "string", "analyzer": "lucene.standard" },
"category": { "type": "string", "analyzer": "lucene.keyword" },
"price": { "type": "number" }
}
}
}
},
{
"id": "64f2a0e1c3b4d5e6f7a8b902",
"name": "product_vector_search",
"status": "BUILDING",
"queryable": false,
"definition": {
"mappings": {
"dynamic": false,
"fields": {
"embedding": {
"type": "knnVector",
"dimensions": 1536,
"similarity": "cosine"
}
}
}
}
}
],
"status": "success",
"resource": "search-index",
"operation": "list"
}
Expression Reference
| Expression | Returns | Description |
{{ $output.ListIndexes.count }} | integer | Total indexes found. Branch on count == 0 to detect collections with no search indexes. |
{{ $output.ListIndexes.indexes }} | array | Full index list. Pass to a Loop node to inspect each index individually. |
{{ $output.ListIndexes.indexes[0].name }} | string | Name of the first index. |
{{ $output.ListIndexes.indexes[0].status }} | string | Status of the first index — READY, PENDING, BUILDING, or FAILED. |
{{ $output.ListIndexes.indexes[0].queryable }} | boolean | true when the index is ready to serve $search queries. Gate dependent aggregations on this value. |
{{ $output.ListIndexes.indexes[0].definition }} | object | The full index definition object for inspection or comparison. |
Node Policies & GuardRails
| Policy | Recommendation |
| Credential storage | Always reference ConnectionUri from BizFirst Credentials Manager. This operation authenticates to Atlas using the connection string credentials. |
| Atlas tier requirement | Before using this operation, confirm the target cluster is M10+. A connection error or empty index list from an M0/M2/M5 cluster is expected behaviour — the API endpoint is unavailable on shared tiers. |
| Gate $search on READY status | Never execute a $search aggregation without first verifying the index status == "READY" and queryable == true. A non-READY index either returns no results or raises an error, causing silent search failures. |
| Poll after create/update | After creating or updating an index, poll this operation every 10–30 seconds until the index reaches READY state. Do not assume the index is immediately usable — build time depends on collection size. |
| Error port for FAILED status | Check each returned index for status == "FAILED" in a loop. A failed index silently serves stale or no results. Trigger an alert and attempt searchindex/update or manual intervention when a FAILED index is detected. |
| Audit regularly | Schedule a weekly searchindex/list run across all critical collections to detect orphaned indexes consuming resources and indexes stuck in non-READY states that may have gone unnoticed. |
Workflow Examples
Example 1 — Pre-Deployment Index Check
{
"resource": "search-index",
"operation": "list",
"ConnectionUri": "{{ $credentials.mongodbAtlas }}",
"Database": "ecommerce",
"Collection": "products"
}
// Follow with IfCondition:
// indexes.find(i => i.name === "product_search" && i.status === "READY")
// Branch "not found" → Slack alert + halt deployment
Example 2 — Poll Index Until READY
// Loop node wraps: [Delay 15s] → [searchindex/list] → [IfCondition]
// IfCondition: $output.PollIndex.indexes[0].status == "READY"
// true → exit loop, continue workflow
// false → continue loop (retry)
{
"resource": "search-index",
"operation": "list",
"ConnectionUri": "{{ $credentials.mongodbAtlas }}",
"Database": "catalog",
"Collection": "{{ $json.targetCollection }}"
}
Example 3 — Weekly Index Audit Report
{
"resource": "search-index",
"operation": "list",
"ConnectionUri": "{{ $credentials.mongodbAtlas }}",
"Database": "{{ $json.database }}",
"Collection": "{{ $json.collection }}"
}
// Runs inside a Loop over a list of {database, collection} pairs
// Collects all outputs, then formats and emails the audit summary