MongoDB Ex icon

MongoDB Ex

MongoDB Extended - Advanced MongoDB operations, including support for filters, bulk operations, full update JSON support and more.

Search Index → Update

AI-generated

Summary

Update a MongoDB Atlas Search index

Inputs

  • collection (required) — MongoDB Collection
  • indexNameRequired (required) — The name of the search index
  • indexDefinition (required) — The search index definition

Output shape

a list of items; each item's json contains the updated index name mapped to true

The json object uses the index name as a dynamic key with value true; errors are returned as {error: } when continueOnFail is disabled.

Examples

Example 1: Update an existing search index

Collection: posts, Index Name: title_idx, Index Definition: {"type":"vectorSearch","definition":{"type":"default","fields":[{"vectorFieldName":"embedding","queryName":"$query"}]}}

Discussion