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
  • Alias not swapped after apply
    • IndexationAborted prevented the swap because indexing returned a non-ok status; the new physical was auto-deleted
    • Fix import errors and retry
    • See Schema → Failed indexation safety
  • Orphaned physical collections accumulating
    • Since v30.6.14, failed/interrupted applies auto-clean the new physical. For older orphans, run SearchEngine::Schema.prune_orphans! or rails ‘search_engine:schema:prune_orphans’
    • See Schema → Orphan pruning

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.