Search Index
Search Index is the MongoDB component for managing the search indexes of an Atlas collection: those for text search and those for search by meaning with MongoDB Vector Store.
When to use it
- Creating the vector index a collection needs before searching it by meaning.
- Checking which indexes a collection has.
- Deleting an index no longer in use.
Configuration
The Operation field decides what the component does: List Search Index (default), Create Search Index, Update Search Index or Drop Search Index.
You need a MongoDB Connection credential with your MongoDB cluster details. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The MongoDB Connection credential. |
| Database Name (required) | The database that holds the collection. |
| Collection Name (required) | The collection whose indexes are managed. |
| Operation (required) | What the component does. |
| Index Type (required) | vectorSearch (default), for search by meaning, or search, for text search. |
| Index Name (required) | A unique name for the index, for example products_index. |
| Index Definition (required) | The index structure in MongoDB format. For a vector index, give the field that holds the vectors, their size and how similarity is measured; the field’s help includes an example. |
Output
The Data output holds the list of indexes or the result of the operation.
Example
Before searching its catalogue by meaning, a shop creates the vector index.
- Add Search Index with the MongoDB Connection credential, the
shopdatabase and theproductscollection. - Choose
Create Search Index, thevectorSearchtype and the nameproducts_index. - In Index Definition, describe the vector field following the help’s example, and run it.
Related components
- Document: works with a collection’s documents.
- MongoDB Vector Store: uses the vector index to search.