Skip to content

Meilisearch primary key and index settings; table in stream payload - #18

Merged
emoss08 merged 1 commit into
mainfrom
feat/meili-index-settings
Oct 5, 2026
Merged

emoss08 merged 1 commit into
mainfrom
feat/meili-index-settings

Conversation

@emoss08

@emoss08 emoss08 commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Meilisearch table entries accept primary_key (default id), searchable_attributes and filterable_attributes. The sink applies them at startup: creates the index with its key if missing, fails fast on an index keyed by a different field, and updates attributes only when they differ (no reindex on restart). Deletes use the configured key.
  • Tables sharing one index must agree on its settings (validated at startup).
  • Redis stream payloads now include schema and table.

Needed so Trenova can drop its bundled copy of GTC and run this image: Trenova rows carry id, organization_id and business_unit_id, so Meilisearch cannot infer the key, and Trenova's table-change-alert consumer reads one stream fed by several tables.

Testing

  • go vet ./..., unit tests for the config parsing and conflict checks.
  • Exercised the sink against a live Meilisearch 1.16: index created with key and attributes, insert + filtered search, partial update, delete by key, restart with matching settings, and the primary-key mismatch error.

🤖 Generated with Claude Code

… stream payload

Meilisearch cannot infer a primary key when rows have more than one
column ending in id (id, tenant_id, ...) and rejects the documents.
Meilisearch table entries now take primary_key (default id),
searchable_attributes and filterable_attributes. The sink creates each
index with its key at startup, refuses an existing index keyed by a
different field, and updates attributes only when they differ so a
restart does not reindex. Deletes look documents up by the configured
key. Tables sharing an index must agree on its settings.

Redis stream payloads now carry schema and table, so consumers of a
stream fed by several tables can tell entries apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@emoss08
emoss08 merged commit de9e7de into main Oct 5, 2026
7 checks passed
@emoss08
emoss08 deleted the feat/meili-index-settings branch October 5, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant