← Back to all posts
6 min readCentrali Team

Centrali 2.3.0: Full-Text Search, Reference Properties, and SDK Enhancements

Find any record instantly with global search, define relationships between structures, and leverage smart queries in the SDK.

ProductAnnouncementChangelog

Centrali 2.3.0 is here with three major additions that make building applications faster and more powerful: full-text search, reference properties, and SDK enhancements.

Full-Text Search

Finding data shouldn't require writing complex queries. With 2.3.0, you can search across all records in your workspace instantly.

How It Works

Records are automatically indexed when created, updated, or deleted. No configuration needed—just start searching.

In the Console:

Press Cmd+K (or Ctrl+K on Windows/Linux) and select "Search all records..." to open the global search. Results are grouped by structure type, and clicking a result takes you directly to that record.

In the SDK:

typescript
// Basic search const results = await centrali.search('customer email'); console.log('Found:', results.data.totalHits, 'results'); // Filter by structure const userResults = await centrali.search('john', { structures: 'users' }); // Search multiple structures with limit const results = await centrali.search('active', { structures: ['users', 'orders'], limit: 50 });

What Gets Indexed

All record fields are indexed automatically. The search is typo-tolerant and supports partial matches, so "custmer" will still find "customer".

Response Format

typescript
{ hits: [ { id: '...', structureSlug: 'customers', recordSlug: '...', ...data }, { id: '...', structureSlug: 'orders', recordSlug: '...', ...data } ], totalHits: 42, processingTimeMs: 3, query: 'john' }

Reference Properties

Define relationships between structures with validation, cascade behaviors, and automatic expansion.

Defining References

Add a reference property to your structure:

json
{ "name": "customer", "type": "reference", "target": "customers", "displayField": "name", "required": true, "onDelete": "restrict" }

Validation

When you create or update a record with a reference, Centrali validates that the referenced record exists:

bash
POST /structures/orders/records { "customer": "invalid-id", "total": 99.99 }
json
{ "error": "Reference validation failed", "details": [ { "field": "customer", "message": "Referenced record 'invalid-id' not found in 'customers'" } ] }

Cascade Behaviors

Control what happens when a referenced record is deleted:

  • restrict — Prevent deletion if other records reference this one
  • cascade — Delete all records that reference this one
  • set_null — Set the reference field to null

Console UI Support

The structure editor now includes a reference builder with smart dropdowns:

  1. Select "Reference" as the property type
  2. Choose the target structure
  3. Pick which field to display (e.g., "name", "email")
  4. Configure cascade behavior

SDK Smart Queries

Execute predefined queries programmatically with the new smartQueries namespace.

List Available Queries

typescript
// List all smart queries in the workspace const allQueries = await centrali.smartQueries.listAll(); // List queries for a specific structure const customerQueries = await centrali.smartQueries.list('customers');

Execute Queries

typescript
// Get a query by name const query = await centrali.smartQueries.getByName('customers', 'Active VIPs'); // Execute it const results = await centrali.smartQueries.execute('customers', query.data.id); console.log('Found:', results.data.length, 'VIP customers');

Smart queries are created in the console and can include complex filters, sorting, and pagination. The SDK lets you run them without duplicating the query logic in your code.

Trigger Pause/Resume

You can now pause and resume triggers directly from the console. This is useful for:

  • Maintenance windows — Pause processing during deployments
  • Testing — Disable triggers while debugging
  • Rate limiting — Temporarily stop event processing

Click the pause icon next to any trigger in the Triggers list, or use the Pause/Resume buttons in the trigger detail view.

Other Improvements

  • Search results grouped by structure — Easier to scan and navigate
  • Reference validation at create/update time — Prevents orphaned references
  • Structure search fixes — Console now properly handles search API parameters

Bug Fixes

  • Race conditions in reference builder dropdowns
  • Nullable validation for reference properties
  • Scheduler state sync with database enabled flag
  • SDK response handling for wrapped result format
  • Missing enabled field in trigger creation

What's Next

We're continuing to improve search with faceted filtering and highlighting. Reference properties will get automatic expansion via ?expand= query parameters. And we're working on function versioning for safer deployments.

Get Started

Update your SDK to the latest version:

bash
npm install @centrali-io/centrali-sdk@latest

Check the changelog for the complete list of changes, and visit docs.centrali.io for detailed documentation.

Building something with Centrali and want to share feedback about this feature?

Email feedback@centrali.io