Endpoint
Request Body
Number of records to process in each batch. Larger values are faster but use more memory
Response
Confirmation message that the reindex operation has started
Initial progress information
Example Request
Example Response
Monitoring Progress
Use the Get Reindex Progress endpoint to monitor the reindex operation:When to Reindex
You should trigger a reindex in the following situations:Initial Setup
When first deploying Blnk with Typesense search enabled.After Data Migration
After importing large amounts of data directly into the database.Schema Changes
After updating search collection schemas or adding new searchable fields.Data Inconsistencies
If you notice search results don’t match database records.Recovery
After recovering from a Typesense outage or data corruption.Reindex Process
The reindex operation processes collections in the following order:- Ledgers: Base collection, reindexed first
- Identities: User and entity records
- Balances: Account balance records
- Transactions: Transaction history
- Reconciliations: Reconciliation records
Error Responses
Error message describing what went wrong
Current progress information (returned when a reindex is already running)
Common Errors
409 Conflict: A reindex operation is already in progressPerformance Considerations
Batch Size
- Small (100-500): Lower memory usage, slower overall
- Medium (500-1000): Balanced performance (recommended)
- Large (1000-5000): Faster but higher memory usage
Database Impact
Reindexing reads from your database:- Uses read replicas if available
- Minimal impact on write operations
- May increase database CPU during reindex
Duration Estimates
| Records | Batch Size | Estimated Time |
|---|---|---|
| 10,000 | 1,000 | 1-2 minutes |
| 100,000 | 1,000 | 10-15 minutes |
| 1,000,000 | 1,000 | 1-2 hours |
| 10,000,000 | 2,000 | 8-12 hours |
Best Practices
- Schedule during low traffic: Run reindex during off-peak hours
- Monitor progress: Check the progress endpoint regularly
- Use appropriate batch size: Balance speed and resource usage
- Don’t interrupt: Let the reindex complete naturally
- Have a backup: Ensure your database is backed up before major reindex operations
Incremental Updates
For normal operations, you don’t need to reindex. Blnk automatically updates the search index when:- New records are created
- Existing records are updated
- Records are deleted