Database Collection
SearchBlox lets you index database table records easily, with results customizable using Faceted Search.
Creating a Database Collection
You can Create a Database Collection with the following steps:
-
Log in to the Admin Console, go to the Collections tab, and click Create a New Collection or the "+" icon.
-
Select Database Collection as the Collection Type.
-
Enter a unique name (e.g., DatabaseCollection).
-
Set Collection Access (Private or Public) and Encryption as needed.
-
Choose the content language if it’s not English.
-
Click Save to create the collection.

-
After creating the Database Collection, you will be taken to the Database Settings tab.
Supported Databases
SearchBlox supports indexing from these databases:
| Database Type | Database Type |
|---|---|
| MySQL | Snowflake |
| SQL Server | Solr |
| Oracle | Sybase |
| PostgreSQL | Sybase IQ |
| Apache Impala | Teradata |
| Apache Phoenix | TimescaleDB |
| Azure Synapse | YugabyteDB |
| Cassandra | QuestDB |
| CockroachDB | Materialize |
| Databricks | RisingWave |
| Elasticsearch | TIDB |
| OpenSearch | StarRocks |
| EnterpriseDB | Apache Doris |
| Greenplum | OceanBase |
| IBM DB2 | ClickHouse |
| IBM Informix | DuckDB |
| MariaDB | SQLite |
| Parquet | H2 |
| Presto | Firebird |
| Redshift | Arrow Flight SQL |
| SAP HANA | Vertica |
| SAP Hana XSA | Exasol |
| SingleStore |
Database Settings
-
Database settings must be configured for Database Collections.
-
Mandatory settings for databases like MySQL, Oracle, etc., include:
-
Database Type
-
Host IP/Name
-
Host Port Number
-
Database Name
-
Database Username
-
Database Password
-
SQL Query

-
- The following table lists all the available settings for Database Collections.
| Field | Description |
|---|---|
| Database Type | The database to be indexed. SearchBlox supports MySQL, SQL Server, Oracle, PostgreSQL, and other drivers. The list of other drivers supported by SearchBlox is provided here: Supported DB Connectors |
| Host IP/name | Enter the IP address or name of the database host. (Default is localhost). |
| Host Port No. | Enter the port number of the database. |
| Database Name | Name of the database containing the tables to be indexed. |
| Database Username | Username for accessing the database. |
| Database Password | Password for the database user. |
| SQL Query | SQL query used to fetch the table data for indexing. Example: SELECT * FROM tablename. |
| Relevance - Remove Duplicates | Prevents indexing duplicate documents with the same content. Default is NO. |
| Relevance - Stemming | Treats inflected words as their root form (e.g., "running", "runs", "ran" → "run"). 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 where the search term appears. |
| SQL Settings - Fetch Size | Sets the maximum number of records fetched from the database per request. Default is 100. |
| 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 that contains special characters. |
NOTE:
- While providing a
SQL QueryinDatabase Settingspage, make sure to provide the primary key asuidelse while reindexing/scheduled indexing duplicate documents gets added.- If you notice document missing while scheduled index/reindex, please increase the
SQL Settings-Fetch Size, which you will find underSettingspage as shown in the following screenshots.
After saving the Database settings, test the connection. The connection must be successful for indexing to work.

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.

Stopwords
Stopwords are common, high-frequency words that carry minimal semantic value and are typically excluded during text processing, indexing, or search operations. Examples include articles (a, an, the), conjunctions (and, but, or), prepositions (in, on, about), and auxiliary verbs (is, was, would, had).
Purpose:
Reduce noise in search indexing and text analysis
Improve processing efficiency by excluding low-value tokens
Enhance search relevance by prioritizing meaningful keywords

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 Database collections.
| 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. |

Data Fields Tab
The Data Fields tab lets you create custom fields for search and view the default fields in non-encrypted collections.
SearchBlox supports 4 types of Data Fields:
| Type | Description |
|---|---|
| Keyword | For alphanumeric values like IDs, tags, or codes |
| Number | For numeric values like prices or quantities |
| Date | For date values to use in search and filters |
| Text | For full-text search in custom fields |
- After configuring Data Fields, you must clear and re-index the collection for changes to take effect.
To know more about Data Fields please refer to Data Fields Tab
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
- Verify the type of application or database to be indexed and provide the appropriate database settings.
- If your SQL SELECT query doesn’t have a unique ID, create a view with a unique ID and use it in the query to fetch data.
- For multiple collections, schedule them so that only 2–3 collections index at the same time.
Viewing Search Results
- View the search results by searching for the records here: https://localhost:8443/search/index.html.
- After clicking the search results, the data will appear in a grid format.

If you want search results in the grid view, use SearchBlox's Database plugin. Learn more about Database Search
Updated 4 days ago
