Schema

Schema #

A collection’s schema describes its fields: the type of every field, the parameters each field is indexed and stored with, and how fields the schema does not know yet are handled. It is versioned, Raft-replicated, and evolves additively — fields can be added and re-parameterized, never deleted.

{
  "version": 3,
  "dynamic": "true",
  "properties": {
    "body": {
      "type": "text",
      "analyzer": "standard",
      "fields": {
        "embedding": {
          "type": "dense_vector",
          "vector_options": { "model": "text-embedding-3-small", "dims": 1536 }
        }
      }
    }
  }
}

Three knobs live at the schema root:

  • version — incremented on every applied change; read-only.
  • dynamic — how writes with unknown fields are handled:
    • true (default): new fields are added to the schema automatically. A JSON string infers text with a keyword sub-field; numbers, booleans and objects infer their natural type.
    • false: unknown fields are neither indexed nor added — they still appear in _source.
    • strict: documents with unknown fields are rejected.
  • properties — the field tree. Nested objects use properties ("user": {"type": "object", "properties": {...}}); same-field variants use multi-fields (fields), which is also how the declarative semantic embedding above works — see vector search.

In this section #

  • Field types — every supported type, grouped by family, with its parameters and multi-value support.
  • Field parameters — the cross-type parameter catalog, grouped by category: analysis, indexing, storage placement, realtime and in-place, structural, type-specific.

Managing schemas #

Calendar September 29, 2026
Edit Edit this page