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? if Thread.current.key?("PgSearch.enable_multisearch") Thread.current["PgSearch.enable_multisearch"] else true end end
def pg_search_rank
def pg_search_rank read_attribute(:pg_search_rank).to_f end