KinoSe...Filter(3pm)

✨ NAME ✨

KinoSearch1::Search::QueryFilter β€” bestie, we're building a filter out of the results of a query πŸ’…

(also it lives in the perl manual, section 3pm, under User Contributed Perl Documentation, and it's giving very much "custom module" energy ✨)


🌸 SYNOPSIS 🌸

my $books_only_query  = KinoSearch1::Search::TermQuery->new(
    term => KinoSearch1::Index::Term->new( 'category', 'books' );
);
my $filter = KinoSearch1::Search::QueryFilter->new(
    query => $books_only_query;
);
my $hits = $searcher->search(
    query  => $query_string,
    filter => $filter,
);

no cap, that's the whole vibe right there 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: a QueryFilter spawns a whole result set, and that result set can then be used to filter the results of another query. it's basically the same effect as adding a required clause to a BooleanQuery β€” like, same outcome, different route πŸŽ€

BUT. and this is the part that ate: a QueryFilter caches its results. so if you're gonna use it more than once, it is more efficient. reuse her, she's worth it πŸ’–


πŸ‘‘ METHODS πŸ‘‘

πŸ’œ new

my $filter = KinoSearch1::Search::QueryFilter->new(
    query => $query;
);

Constructor, bestie. she takes exactly one hash-style parameter, query, and that query has got to be an object belonging to a subclass of KinoSearch1::Search::Query. that's the whole requirement, periodt ✨


Copyright 2005-2010 Marvin Humphrey πŸ‘‘


πŸ“œ LICENSE, DISCLAIMER, BUGS, etc. πŸ“œ

See KinoSearch1 version 1.01. (yes that's really all it says, go look it up yourself, iykyk πŸ™ˆ)


and that's the page!! this little beauty is from the perl v5.42.3 manual, dated 2026-08-20, section 3pm β€” User Contributed Perl Documentation 🫢 slay, go filter something πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from