MongoDB Collection
Creating a MongoDB Collection
A MongoDB collection can be created using the following steps:
- Log in to the Admin Console
- Go to the Collections tab
- Click "Create a New Collection" or the "+" icon
- Select "MongoDB Collection" as the Collection Type
- Enter a unique name (e.g., MongoDB)
- Set Collection Access (Private or Public)
- Configure Encryption as needed
- Click Save to create the collection

- After creating the MongoDB collection, you will be taken to the MongoDB tab.
MongoDB Collection Settings
-
MongoDB settings must be configured explicitly for each collection.
-
Mandatory settings for a MongoDB collection:
- Host Name
- Port Number
- MongoDB Type
- MongoDB Database Name
- MongoDB Database Collection
-
SearchBlox provides default parameters for new MongoDB collections, which can be modified as needed.
-
The table lists all available settings for MongoDB collections.
| Field | Description |
|---|---|
| Host Name | The IP address or server name where MongoDB is running. Default is localhost. |
| Port Number | The port on which MongoDB is running. |
| MongoDB Type | Type of MongoDB connection. The default is local. |
| User Name | Username for MongoDB access (leave blank if your MongoDB does not require a username). |
| Password | Password for the MongoDB user. |
| MongoDB Database Name | Name of the database that will be indexed. |
| MongoDB Database Collection | The specific collection inside the database that will be indexed. |
| Fetch Size | Maximum number of records fetched at one time. Default value is 100 |
| Relevance - Stemming | Stemming matches different word forms (e.g., run, running, ran). Helps improve search relevance. Default is YES. |
| Relevance - Spelling Suggestions | Provides spelling suggestions for the collection. Default is YES. |
| Keyword-in-Context Display | Shows search results with snippets from content areas where the search term appears. |
| Enable Detailed Log Settings | When debug mode is on, logs detailed indexing activity in index.log, including URL status, timestamps, status codes, and time taken. Default is NO. |
| Enable Content API | Allows the crawler to index document content with special characters. |


Schedule and Index**
Set when and how often a collection should be indexed. SearchBlox supports these schedule options:
- Once
- Hourly
- Daily
- Every 48 Hours
- Every 96 Hours
- Weekly
- Monthly
The following operations can be performed in a MongoDB collection:
| Activity | Description |
|---|---|
| Enable Scheduler for Indexing | Turn this on to set the start date and how often indexing should run. |
| Save | Saves your scheduling settings for the collection. |
| View all Collection Schedules | Opens the Schedules page where you can see all scheduled collections. |
Models
Embedding
- Provider specifies the embedding provider used to generate vector representations of documents.
- Model defines the embedding model used to convert document content into vectors for semantic search.
Reranker
- Provider specifies the reranker provider used for improving search result relevance.
- Model defines the reranker model used to re-score and reorder search results based on relevance.
LLM
-
Provider specifies the Large Language Model provider used for AI-powered features.
-
Model defines the LLM used for tasks such as document enrichment, summaries, and SmartFAQs.
-
These settings override global configurations and apply only to the current collection.
Best Practices
- Verify the MongoDB setup steps in the documentation with your MongoDB admin to ensure successful indexing.
- Enter correct and relevant MongoDB settings in the collection settings.
- For multiple collections, schedule them so that only 2–3 collections index at the same time.
Updated 11 days ago
