Skip to main content
Quick reference for common issues. Each section links to deeper docs. Related: Observability, CLI, Testing

Joins

  • Missing or invalid association name
    • Ensure you declared it on the model with belongs_to :name, has_one :name, or has_many :name
    • See Joins → DSL
  • Joined fields not appearing in selection
    • Use nested include fields and prefix joined fields with $assoc.field
    • See Field selection

Grouping

Presets

Curation

  • Hidden IDs still visible
    • Ensure filter_curated_hits is set when you want hidden hits excluded
    • See Curation → DSL
  • Order of pinned hits unstable

CLI

  • Task arguments parsed incorrectly
  • doctor exits with 1

DX

  • to_curl shows API key
    • Keys are redacted; update to latest, or file an issue with a snippet
    • See DX
  • dry_run! performs I/O
    • dry_run! compiles only; check for accidental client calls
    • See DX → Helpers

Schema

  • Drift not detected
    • Use aliases correctly; compare compiled vs active physical
    • See Schema → Diff
  • Rollback unavailable
    • Retention may be insufficient; ensure previous physical retained
    • See Schema → API

Indexer

Testing

  • Stub not capturing calls
    • Ensure SearchEngine.config.client = SearchEngine::Test::StubClient.new
    • Explicit SearchEngine.config.client always takes precedence over offline mode
    • See Testing → Quick start
  • Test mode not working as expected
    • Verify test_mode is enabled: SearchEngine.config.test_mode? should return true in test environment
    • Check environment: Rails.env.test? or RACK_ENV=test enables test mode automatically
    • Override via SEARCH_ENGINE_TEST_MODE=1 or SEARCH_ENGINE_OFFLINE=1 (legacy alias)
    • Use SearchEngine.client to access the configured client instance
    • Note: if SearchEngine.config.client is explicitly set, it always wins
    • See Testing → Test mode

Observability

Deletion

  • No effect / deleted 0 docs
    • Verify into: points to the intended physical (or rely on alias)
    • Ensure filter is correct; try rel.dry_run! first to preview
    • See Deletion
  • Empty input error
  • Model.cleanup or index:delete_stale skipped
    • Ensure you declared stale rules inside index; otherwise cleanup logs a skip and returns 0
    • Remember rules are OR‑ed; verify at least one resolves to a non‑empty filter for the given partition

Error Reference

The gem provides a structured error hierarchy under SearchEngine::Errors.
ErrorDescriptionAction
TimeoutRequest exceeded timeout_ms.Check network or increase timeout.
ConnectionDNS/Socket failure.Check host availability.
ApiNon-2xx response from Typesense.Check error.status and error.body.
InvalidParamsMissing or invalid inputs.Fix arguments provided to method.
InvalidFieldField not in schema (and strict mode on).Add field to schema or disable strict_unknown_keys.
UnknownFieldField referenced in selection not declared on model.Add attribute declaration or fix typo.
InvalidOperatorOperator not recognized by query parser.Use supported operators (see Query DSL).
InvalidTypeValue cannot be coerced to declared type.Fix value type or enable coercions.
InvalidSelectionMaterializer requests fields not permitted by selection.Adjust relation’s select/exclude or materializer.
MissingFieldHydration missing required field.Ensure API returns field or mark optional.
ConflictingSelectionSelection inputs are malformed or ambiguous.Normalize selection inputs.
InvalidGroupGrouping DSL used with invalid inputs.Fix field names, limits, or missing_values.
UnsupportedGroupFieldGrouping references joined/path fields.Use base fields only for grouping.
HitLimitExceededResult count > max validation.Narrow query or increase limit.