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
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 likeActiveRecord::Base.ts_search
, then this could be used to target TS specifically.A monkeypatch to accomplish this: