package Note { use Moose; with 'Note::Searchable'; # We want to search title, message, and author has 'title' => ( is => 'rw', isa => 'Str', traits => [qw/Searchable/] ); has 'message' => ( is => 'rw', isa => 'Str', traits => [qw/Searchable/] ); has 'author' => ( is => 'rw', isa => 'Str', traits => [qw/Searchable/] ); # We don't want to search "other" has 'other' => ( is => 'rw', isa => 'Str' ); no Moose; }