Interchange-Search-Solr

 view release on metacpan or  search on metacpan

lib/Interchange/Search/Solr.pm  view on Meta::CPAN


 [ 'en' ]

New in 0.10. To revert to the old behaviour (no filtering of
stopwords), pass an empty arrayref.

=cut

has stop_words => (is => 'lazy', isa => HashRef);

has stop_words_langs => (is => 'ro', default => sub { [qw/en/ ] }, isa => ArrayRef);

sub _build_stop_words {
    my $self = shift;
    my @stopwords;
    foreach my $lang (@{ $self->stop_words_langs }) {
        if (my $stops = Lingua::StopWords::getStopWords($lang, 'UTF-8')) {
            push @stopwords, keys %$stops;
        }
    }
    my %out = map { $_ => 1 } @stopwords;



( run in 0.787 second using v1.01-cache-2.11-cpan-5f2e87ce722 )