-
Notifications
You must be signed in to change notification settings - Fork 468
Closed
Description
Related to #1241.
If you have TS and something else both trying to define ActiveRecord::Base.search
, it's unclear which implementation you will end up with. If TS also defined something like ActiveRecord::Base.ts_search
, then this could be used to target TS specifically.
A monkeypatch to accomplish this:
# To disambiguate #search (ES vs TS).
module DisambiguousThinkingSphinx
extend ActiveSupport::Concern
module ClassMethods
def ts_search(query = nil, options = {})
merge_search ThinkingSphinx.search, query, options
end
end
end
ActiveRecord::Base.include DisambiguousThinkingSphinx
Metadata
Metadata
Assignees
Labels
No labels