MongoDB Collection
MongoDB Collections allow SearchBlox to index documents stored in a MongoDB database, making your NoSQL data fully searchable. This is useful when your application data lives in MongoDB and you need to provide search capabilities across that content without migrating it to a different system.
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. |


Synonyms
Synonyms help the search show relevant documents even when the exact search word is not used.
For example, if someone searches for “global,” the results can also include documents that use “world” or “international.”
We have an option to load Synonyms from the existing documents.

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. |
Prompts
- When LLM/RAG is enabled, you can edit AI-based prompts for Title, Description, Topic, Image Description, and Smart FAQs.
- You can customize these prompts anytime, and use Restore Default to reset them back to the original SearchBlox settings.

Models
The Models section lets you override the global embedding, reranking, and LLM settings for this specific collection. Changes made here apply only to the current collection and do not affect other collections.
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
- Confirm the Host Name, Port Number, and Database Name with your MongoDB administrator before configuring the collection — incorrect settings are the most common cause of connection failures
- If your MongoDB instance requires authentication, ensure the Username and Password fields are filled in with credentials that have at least read access to the target database and collection
- If documents are missing after indexing, increase the Fetch Size value in the collection settings. The default is 100 records per request
- Use the Enable Detailed Log Settings option during initial setup to verify that documents are being indexed correctly, then disable it once indexing is confirmed working
- For multiple collections, schedule them so that only 2–3 collections index at the same time to avoid performance issues
