Class: PgSearch::Features::TSearch
- Inherits:
-
Feature
- Object
- Feature
- PgSearch::Features::TSearch
show all
- Defined in:
- lib/pg_search/features/tsearch.rb
Overview
rubocop:disable Metrics/ClassLength
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Feature
#initialize
Class Method Details
.valid_options ⇒ Object
9
10
11
|
# File 'lib/pg_search/features/tsearch.rb', line 9
def self.valid_options
super + %i[dictionary prefix negation any_word normalization tsvector_column highlight]
end
|
Instance Method Details
#conditions ⇒ Object
13
14
15
16
17
|
# File 'lib/pg_search/features/tsearch.rb', line 13
def conditions
Arel::Nodes::Grouping.new(
Arel::Nodes::InfixOperation.new("@@", arel_wrap(tsdocument), arel_wrap(tsquery))
)
end
|
#highlight ⇒ Object
23
24
25
|
# File 'lib/pg_search/features/tsearch.rb', line 23
def highlight
arel_wrap(ts_headline)
end
|
#rank ⇒ Object
19
20
21
|
# File 'lib/pg_search/features/tsearch.rb', line 19
def rank
arel_wrap(tsearch_rank)
end
|