MongoDB Collection

Creating a MongoDB Collection

A MongoDB collection can be created using the following steps:

  1. Log in to the Admin Console
  2. Go to the Collections tab
  3. Click "Create a New Collection" or the "+" icon
  4. Select "MongoDB Collection" as the Collection Type
  5. Enter a unique name (e.g., MongoDB)
  6. Set Collection Access (Private or Public)
  7. Configure Encryption as needed
  8. 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.

FieldDescription
Host NameThe IP address or server name where MongoDB is running. Default is localhost.
Port NumberThe port on which MongoDB is running.
MongoDB TypeType of MongoDB connection. The default is local.
User NameUsername for MongoDB access (leave blank if your MongoDB does not require a username).
PasswordPassword for the MongoDB user.
MongoDB Database NameName of the database that will be indexed.
MongoDB Database CollectionThe specific collection inside the database that will be indexed.
Fetch SizeMaximum number of records fetched at one time. Default value is 100
Relevance - StemmingStemming matches different word forms (e.g., run, running, ran). Helps improve search relevance. Default is YES.
Relevance - Spelling SuggestionsProvides spelling suggestions for the collection. Default is YES.
Keyword-in-Context DisplayShows search results with snippets from content areas where the search term appears.
Enable Detailed Log SettingsWhen 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 APIAllows 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:

ActivityDescription
Enable Scheduler for IndexingTurn this on to set the start date and how often indexing should run.
SaveSaves your scheduling settings for the collection.
View all Collection SchedulesOpens 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.