diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-07-29 09:03:56 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-07-31 12:33:38 +0100 |
commit | bd42d6a1fcb6c8e6d89413e0ee22617625d95bad (patch) | |
tree | 2bdbeff779e44d14aa2409f9660ab3c91c9a8377 /perllib/FixMyStreet/DB/ResultSet/Comment.pm | |
parent | 34dd7c253d337ea922049390dc6ba44b8686e516 (diff) |
Add database index for full text search.
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Comment.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Comment.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Comment.pm b/perllib/FixMyStreet/DB/ResultSet/Comment.pm index 034b86a40..0a4403e52 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Comment.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Comment.pm @@ -4,12 +4,17 @@ use base 'DBIx::Class::ResultSet'; use strict; use warnings; +use Moo; +with 'FixMyStreet::Roles::FullTextSearch'; +__PACKAGE__->load_components('Helper::ResultSet::Me'); +sub text_search_columns { qw(id problem_id name text) } +sub text_search_nulls { qw(name) } + sub to_body { my ($rs, $bodies) = @_; return FixMyStreet::DB::ResultSet::Problem::to_body($rs, $bodies, 1); } - sub timeline { my ( $rs ) = @_; |