ankane/searchkick · error · Searchkick::Error
Relation loaded
Error message
Relation loaded
What it means
Error "Relation loaded" thrown in ankane/searchkick.
Source
Thrown at lib/searchkick/relation.rb:693
# private_execute.to_a.as_json(...)
# end
def to_yaml
private_execute.to_a.to_yaml
end
private
def private_execute
@execute ||= query.execute
end
def query
@query ||= Query.new(@model, @term, **@options)
end
def check_loaded
raise Error, "Relation loaded" if loaded?
# reset query since options will change
@query = nil
end
# provides *very* basic protection from unfiltered parameters
# this is not meant to be comprehensive and may be expanded in the future
def ensure_permitted(obj)
obj.to_h
end
def initialize_copy(other)
super
# shallow dup and avoid updating values in-place
@options = @options.dup
@execute = nil
end
View on GitHub (pinned to 93e901a75b)
When it happens
Trigger: Thrown at lib/searchkick/relation.rb:693 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ankane/searchkick@93e901a75b (2026-08-21).
Data as JSON: /api/errors/8f8865a66da19056.
Report an issue: GitHub.