Portal Community
Irreversible operation. Dropping an Atlas Search index permanently deletes it and all its built index data. Any workflow or application query that issues a $search aggregation using this index name will immediately begin returning errors or empty results. The collection data is not affected, but the index must be recreated from scratch (and rebuilt) to restore search functionality.
Atlas M10+ only. This operation requires MongoDB Atlas M10 or above. Shared-tier clusters (M0, M2, M5) and self-hosted MongoDB instances do not support programmatic Atlas Search index management.

When to Use

Configuration

Connection

FieldRequiredDescription
ConnectionUriRequiredMongoDB Atlas connection string. Reference via {{ $credentials.mongodbAtlas }}.
DatabaseRequiredDatabase containing the collection with the index to drop.
CollectionRequiredCollection name on which the target search index is defined.

Operation

FieldRequiredDescription
IndexNameRequiredThe exact name of the Atlas Search index to drop. The index must exist on the specified collection — dropping a non-existent index name raises an error. Use searchindex/list to verify the index exists before dropping.

Sample Configuration

{
  "resource": "search-index",
  "operation": "drop",
  "ConnectionUri": "{{ $credentials.mongodbAtlas }}",
  "Database": "ecommerce",
  "Collection": "products",
  "IndexName": "product_fulltext_v1"
}

Validation Errors

ErrorCause
connectionUri is requiredConnectionUri is empty or not provided.
database is requiredDatabase field is empty.
collection is requiredCollection field is empty.
indexName is requiredIndexName is empty or whitespace.

Output — Success Port

FieldTypeDescription
successbooleantrue when the index was successfully dropped. The index and all its stored index data are permanently gone.
statusstringAlways "success" on the success port.
resourcestringAlways "search-index".
operationstringAlways "drop".

Sample Output

{
  "success": true,
  "status": "success",
  "resource": "search-index",
  "operation": "drop"
}

Expression Reference

ExpressionReturnsDescription
{{ $output.DropOldIndex.success }}booleanConfirm the drop succeeded. Use in downstream IfCondition to gate subsequent create operations in a replace workflow.
{{ $output.DropOldIndex.status }}stringConfirm "success" for conditional branching.

Node Policies & GuardRails

PolicyRecommendation
Credential storageAlways reference ConnectionUri from BizFirst Credentials Manager. Never embed raw Atlas credentials in workflow node configuration.
Verify before dropAlways run searchindex/list before dropping to confirm the index name exists. Attempting to drop a non-existent index name raises an error that may halt a deployment pipeline.
Immediate search breakageThe drop takes effect immediately. Any $search aggregation referencing the dropped index name will fail or return empty results from the moment the drop completes. Coordinate with application deployments to avoid user-visible search downtime.
Drop-then-create patternFor index schema migrations that cannot use searchindex/update, follow a drop with an immediate searchindex/create and then poll for READY. Plan for the search gap between drop and rebuild completion.
Atlas tier requirementConfirm the cluster tier is M10+ before running this operation. On shared-tier or self-hosted instances the call raises a driver-level error.
Log before dropBefore dropping, capture the current index definition using searchindex/list and insert it into an audit collection. This preserves the ability to recreate the exact prior definition if the drop was accidental.
Error port handlingAlways connect the error port to a notification node. A failed drop in an environment teardown or migration workflow should be reported, not silently swallowed.

Workflow Examples

Example 1 — Safe Drop with Existence Check

// Step 1: List indexes
{
  "resource": "search-index",
  "operation": "list",
  "ConnectionUri": "{{ $credentials.mongodbAtlas }}",
  "Database": "ecommerce",
  "Collection": "products"
}
// Step 2: IfCondition — does target index exist?
// indexes.some(i => i.name === "product_fulltext_v1")
//   true  → proceed to drop
//   false → log "index not found", complete without error

// Step 3: Drop
{
  "resource": "search-index",
  "operation": "drop",
  "ConnectionUri": "{{ $credentials.mongodbAtlas }}",
  "Database": "ecommerce",
  "Collection": "products",
  "IndexName": "product_fulltext_v1"
}

Example 2 — Drop and Replace (Schema Migration)

// Step 1: Capture old definition for audit
// (searchindex/list → document/insert into audit_log)

// Step 2: Drop old index
{
  "resource": "search-index",
  "operation": "drop",
  "ConnectionUri": "{{ $credentials.mongodbAtlas }}",
  "Database": "ecommerce",
  "Collection": "products",
  "IndexName": "product_search_v1"
}

// Step 3: Create new index with updated definition
{
  "resource": "search-index",
  "operation": "create",
  "ConnectionUri": "{{ $credentials.mongodbAtlas }}",
  "Database": "ecommerce",
  "Collection": "products",
  "IndexName": "product_search_v2",
  "Definition": {
    "mappings": {
      "dynamic": false,
      "fields": {
        "name":      { "type": "string", "analyzer": "lucene.standard" },
        "embedding": { "type": "knnVector", "dimensions": 1536, "similarity": "cosine" }
      }
    }
  }
}

// Step 4: Poll until READY (searchindex/list in Loop with Delay)

Example 3 — Environment Teardown (Loop Over Index List)

// Loop node over all index names returned by searchindex/list
// Each iteration drops one index:
{
  "resource": "search-index",
  "operation": "drop",
  "ConnectionUri": "{{ $credentials.mongodbAtlas }}",
  "Database": "{{ $json.database }}",
  "Collection": "{{ $json.collection }}",
  "IndexName": "{{ $json.currentItem.name }}"
}