Nested object flattening causes field limit exceeded during ingestion
criticalMeilisearch automatically flattens nested objects into dot-notated fields. Each unique nested path (including array indices) counts as one field. Documents with deeply nested structures or large arrays of objects can exceed the hard limit of 65,535 fields per document, causing ingestion failures. For example, 100 endpoints with 5-field source file arrays creates 500 fields from that single key alone.
Flatten the document structure before indexing. Convert deep nested objects and arrays into JSON-stringified strings using JSON.stringify. Use prefix naming (e.g., 'api_*') for top-level fields. Audit field count at scale before production. The stringified content remains searchable via full-text search but requires client-side parsing if you need to filter or query specific nested properties.