module PgSearch

def disable_multisearch

def disable_multisearch
  Thread.current["PgSearch.enable_multisearch"] = false
  yield
ensure
  Thread.current["PgSearch.enable_multisearch"] = true
end

def multisearch(*args)

def multisearch(*args)
  PgSearch::Document.search(*args)
end

def multisearch_enabled?

def multisearch_enabled?
  Thread.current.key?("PgSearch.enable_multisearch") ? Thread.current["PgSearch.enable_multisearch"] : true
end