Module: PG::FTS::TSVector
- Included in:
- Index::MOMO, Index::ManyToOne, Index::OMMO, Index::OneToMany, Index::Self
- Defined in:
- lib/pg/fts/ts_vector.rb
Instance Method Summary collapse
Instance Method Details
#ts_vector(record = 'NEW') ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/pg/fts/ts_vector.rb', line 2 def ts_vector(record = 'NEW') record = %("#{record}") unless %w(NEW OLD).include?(record) fields.map do |field| %(to_tsvector('#{catalog}', COALESCE(#{record}."#{field}", ''))) end.join(' || ') end |