Module: ROM::Plugins::Relation::SQL::Postgres::FullTextSearch

Defined in:
lib/rom/plugins/relation/sql/postgres/full_text_search.rb

Overview

PG-specific extensions which adds Relation#full_text_search method

Instance Method Summary collapse

Instance Method Details

#full_text_search(*args, &block) ⇒ Relation

Run a full text search on PostgreSQL. By default, searching for the inclusion of any of the terms in any of the cols.

Examples:

posts.full_text_search([:title, :content], 'apples', language: 'english') # => Relation which match the 'apples' phrase

Parameters:

  • :headline (Hash)

    a customizable set of options

  • :language (Hash)

    a customizable set of options

  • :plain (Hash)

    a customizable set of options

  • :phrase (Hash)

    a customizable set of options

  • :rank (Hash)

    a customizable set of options

  • :to_tsquery (Hash)

    a customizable set of options

  • :tsquery (Hash)

    a customizable set of options

  • :tsvector (Hash)

    a customizable set of options

Returns:

See Also:


39
40
41
# File 'lib/rom/plugins/relation/sql/postgres/full_text_search.rb', line 39

def full_text_search(*args, &block)
  new dataset.__send__(__method__, *args, &block)
end