KinoSe...earcher(3pm)
π KinoSearch1::Searcher β the 3pm manual page, but make it cute π
okay bestie, gather round, because this is the page for KinoSearch1::Searcher β that's a Perl module doc, section 3pm, from the User Contributed Perl Documentation. she's the one who actually runs your searches. no cap. π
β¨ NAME β¨
KinoSearch1::Searcher β execute searches π¦
like. she searches. that's the whole job. that's the vibe.
β¨ SYNOPSIS β¨
my $analyzer = KinoSearch1::Analysis::PolyAnalyzer->new(
language => 'en',
);
my $searcher = KinoSearch1::Searcher->new(
invindex => $invindex,
analyzer => $analyzer,
);
my $hits = $searcher->search( query => 'foo bar' );
this is it. this is the whole glow-up. build an analyzer, build a searcher, hit search(), get $hits. main character energy from start to finish. β¨
β¨ DESCRIPTION β¨
use the Searcher class to perform queries against an invindex. that's the assignment and she ate. π₯
β¨ METHODS β¨
πΈ new
my $searcher = KinoSearch1::Searcher->new(
invindex => $invindex,
analyzer => $analyzer,
);
Constructor, babes. she takes two labeled parameters and highkey both of them are required β no skipping, no shortcuts, no "i'll add it later". π
invindexβ can be either a path to an invindex, or aKinoSearch1::Store::InvIndexobject. your choice, both slay. πanalyzerβ an object which subclassesKinoSearch1::Analysis::Analyer, such as a PolyAnalyzer. π and listen: this has to be identical to the Analyzer you used at index-time, or the results won't match up. literally identical. not "basically the same". identical. iykyk. π
πΈ search
my $hits = $searcher->search(
query => $query, # required
filter => $filter, # default: undef (no filtering)
);
process a search and return a Hits object. search() expects labeled hash-style parameters β she's a labels girl, she needs to know what's what. π
queryβ can be either an object which subclassesKinoSearch1::Search::Query, or a query string. if it's a query string, it will be parsed using a QueryParser and a search will be performed against all indexed fields in the invindex. for more sophisticated searching, supply Query objects, such asTermQueryandBooleanQuery. β¨filterβ must be aKinoSearch1::Search::QueryFilter. search results will be limited to only those documents which pass through the filter. she's picky and honestly? valid. π«Ά
β¨ Caching a Searcher β¨
when a Searcher is created, a small portion of the invindex is loaded into memory. π§ β¨ for large document collections, this startup time may become noticeable β in which case reusing the searcher is likely to speed up your search application. caching a Searcher is especially helpful when running a high-activity app under mod_perl. π₯
Searcher objects always represent a snapshot of an invindex as it existed when the Searcher was created. πΈ so if you want the search results to reflect modifications to an invindex, you must create a new Searcher after the update process completes. no, she will not magically know about your edits. she is not psychic. create a new one. periodt. π
β¨ COPYRIGHT β¨
Copyright 2005-2010 Marvin Humphrey π
β¨ LICENSE, DISCLAIMER, BUGS, etc. β¨
See KinoSearch1 version 1.01. π
and that's the whole page, bestie!! this one shipped as perl v5.42.3, dated 2026-08-20, straight from the KinoSearch1 crew at version 1.01 β go forth and search, you absolute icon. π¦πβπ
π¦ where this page comes from
- ubuntu stonking: libkinosearch1-perl 1.01-6build2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms