DBIx::...opList(3pm)
π DBIx::FullTextSearch::StopList π
okay bestie, gather round, because we're talking about DBIx::FullTextSearch::StopList β the little module that handles your stopwords for DBIx::FullTextSearch. this is from the DBIx::...opList(3pm) page in the User Contributed Perl Documentation, and yes we're doing the whole thing, no skips, no skimming, periodt. β¨
πΈ NAME πΈ
DBIx::FullTextSearch::StopList β Stopwords for DBIx::FullTextSearch π
β¨ SYNOPSIS β¨
here's the vibe, in code, exactly as it is:
use DBIx::FullTextSearch::StopList;
# connect to database (regular DBI)
my $dbh = DBI->connect('dbi:mysql:database', 'user', 'passwd');
# create a new empty stop word list
my $sl1 = DBIx::FullTextSearch::StopList->create_empty($dbh, 'sl_web_1');
# or create a new one with default stop words
my $sl2 = DBIx::FullTextSearch::StopList->create_default($dbh, 'sl_web_2', 'english');
# or open an existing one
my $sl3 = DBIx::FullTextSearch::StopList->open($dbh, 'sl_web_3');
# add stop words
$sl1->add_stop_word(['a','in','on','the']);
# remove stop words
$sl2->remove_stop_word(['be','because','been','but','by']);
# check if word is in stoplist
$bool = $sl1->is_stop_word('in');
# empty stop words
$sl3->empty;
# drop stop word table
$sl2->drop;
like... look at that. four different ways to start, and then you just vibe with the words. iconic. π
π¦ DESCRIPTION π¦
so DBIx::FullTextSearch::StopList provides stop lists that can be used -DBIx::FullTextSearch. (yes, that's exactly how it's written, we don't touch the facts around here, bestie.) π
and here's the cute part: StopList objects can be reused accross several FullTextSearch objects. one list, many users. main character energy fr fr. β¨
π METHODS π
π CONSTRUCTERS π
(spelled exactly like that in the original, iykyk, we keep it π)
create_empty
my $sl = DBIx::FullTextSearch::StopList->create_empty($dbh, $sl_name);
This class method creates a new StopList object. β¨ fresh, empty, ready to be filled with your little stopwords.
create_default
my $sl = DBIx::FullTextSearch::StopList->create_default($dbh, $sl_name, $language);
This class method creates a new StopList object, with default words loaded in for the given language. π
Supported languages include:
- Czech
- Danish
- Dutch
- English
- Finnish
- French
- German
- Italian
- Portuguese
- Spanish
- Swedish
eleven languages, no cap. pick your fave and go. π«Ά
open
my $sl = DBIx::FullTextSearch::StopList->open($dbh, $sl_name);
Opens and returns a StopList object. like walking back into a room you already decorated. πͺβ¨
π§ OBJECT METHODS π§
add_stop_word
$sl->add_stop_word(\@stop_words);
Adds stop words to the StopList object. Expects an array reference as the argument β not a plain list, an array ref, bestie, don't forget the backslash. π
remove_stop_word
$sl->remove_stop_word(\@stop_words);
Remove stop words from the StopList object. bye bye words ππ
is_stop_word
$bool = $sl->is_stop_word($stop_word);
Returns true iff stop_word is a StopList object... that's literally what the original says, we're reporting it faithfully. π
empty
$sl->empty;
Removes all stop words in the StopList object. a full reset. clean slate. slay. β¨
drop
$sl->drop;
Removes the table associated with the StopList object. ποΈ (the table, bestie, not the object's whole life, just the table.)
π AUTHOR π
T.J. Mather, tjmather@tjmather.com, http://www.tjmather.com/ π
π COPYRIGHT π
All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π«Ά
π SEE ALSO π
DBIx::FullTextSearch
π POD ERRORS π
not me having to report this but yes, the original document had some coding errors, and they are explained below:
Around line 203:
- You forgot a
'=back'before'=head2'
Around line 205:
'=item'outside of any'=over'
Around line 225:
- You forgot a
'=back'before'=head2'
Around line 227:
'=item'outside of any'=over'
the docs are lowkey a mess but the module ate, so we move. π
okay that's the whole page, every option, every method, every language, every POD error, all of it. π
sign-off time: this was perl v5.26.1, dated 2018-04-02, straight from the DBIx::...opList(3pm) page β and honestly, for a 2018 doc it's still serving looks. bye bestie, go stop some words π¦β¨π
π¦ where this page comes from
- debian bookworm: libdbix-fulltextsearch-perl 0.73-12
- debian trixie: libdbix-fulltextsearch-perl 0.73-12
- ubuntu jammy: libdbix-fulltextsearch-perl 0.73-12
- ubuntu noble: libdbix-fulltextsearch-perl 0.73-12
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms