Skip to main content
Related: Models, Relation, Indexer, Schema, JOINs Use this section as a quick reference for common flows. Start with the page that matches what you are doing right now.

Model configuration

Define collections, fields, identity, and defaults.

Indexing

Map source data and build documents.

Reindexing

Apply schema changes with blue/green swaps.

Searching and filtering

Query, filter, paginate, and select fields.

JOINs and relations

Declare relationships and query across collections.

Scopes and advanced ORM

Compose scopes, presets, curation, grouping, and more.

Common flows

  • Model configuration: define collection, attribute, identify_by, query_by.
  • Indexing: map source records with index do … map.
  • Reindexing: run Schema.apply! with a rebuild block.
  • Searching: chain search, order, page, per.
  • Filtering: use where with hashes, templates, or raw strings.
  • Joining: declare associations and use joins with nested filters.
  • Scopes: define reusable filters on the model.
  • Advanced ORM: combine join, scope, filter, search, and selection.
  • Relations: model one-to-one, one-to-many, and many-to-many patterns.