pg_search_plugin.rb 399 Bytes
require 'ext/active_record'

class PgSearchPlugin < Noosfero::Plugin

  def self.plugin_name
    "Postgres Full-Text Search"
  end

  def self.plugin_description
    _("Search engine that uses Postgres Full-Text Search.")
  end

  def find_by_contents(asset, scope, query, paginate_options={}, options={})
    {:results => scope.pg_search_plugin_search(query).paginate(paginate_options)}
  end

end