Plucen...opDocs(3pm)

πŸ“¦
version 1.25 Β· 2 versions
  • 1.25 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.25 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Plucene::Search::TopDocs β€” the top hits for a query πŸ’–

okay so bestie, welcome to Plucene::Search::TopDocs πŸ’… this is a Perl module, it lives in the 3pm manual section, and it's filed under User Contributed Perl Documentation. it's giving "small but mighty" energy ngl 🌸

basically this lil cutie is the top hits for a query. that's the whole vibe. it holds your winners and tells you how many of them there are. no cap.


✨ SYNOPSIS ✨

my $total_hits = $top_docs->total_hits;
my @score_docs = $top_docs->score_docs(@other);

look at that. two whole lines. she's compact, she's iconic, she ate πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so… the description section is literally empty πŸ™ˆ like, nothing. zero. the void. the author said "the name says it all" and dipped. and honestly? respect πŸ‘‘

so we move straight to the methods, which is where the actual content lives. periodt.


🌈 METHODS 🌈

πŸ’œ total_hits

my $total_hits = $top_docs->total_hits;

this one returns the total number of hits for the query ✨ that's it, that's the whole job, and she does it flawlessly. a queen of scope. no notes.

🩷 score_docs

my @score_docs = $top_docs->score_docs(@other);

and this one hands you the top hits for the query πŸ”₯ you pass in @other, you get back your @score_docs. the cream of the crop. the main characters. the ones that made it onto the list πŸ‘‘


lowkey reminder: the SYNOPSIS shows score_docs being called with @other and returning @score_docs, and total_hits returning a scalar. copy that exactly, don't freestyle, iykyk πŸ’–

and that's the page!! shoutout to the perl gang β€” this was documented under perl v5.36.0, dated 2022-12-04, and yes bestie that footer info absolutely counts as lore 🫢 go forth and query, you're gonna slay βœ¨πŸ’…πŸŒŸ

πŸ“¦ where this page comes from