Plucen...Scorer(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::BooleanScorer β€” a boolean scorer, bestie πŸ’–

okay so this is Plucene::Search::BooleanScorer, from the Plucene::Search family, and it's literally a scoring class for boolean scorers. that's the whole vibe. it's giving "yes/no but make it math." periodt. πŸŽ€


✨ SYNOPSIS ✨

it's a Plucene::Search::Scorer, no cap:

# isa Plucene::Search::Scorer

$bool_scorer->add($scorer, $required, $prohibited);
$bool_scorer->score($results, $max_doc);

like… that's it. two calls. she's efficient. πŸ’…


🌸 DESCRIPTION 🌸

This is a scoring class for boolean scorers. yes that's the actual sentence, and honestly? iconic of it. it takes scorers and boolean logic ($required, $prohibited) and turns them into a score. that's the whole main character arc. πŸ‘‘


πŸ¦‹ METHODS πŸ¦‹

🫢 new

my $bool_scorer = Plucene::Search::BooleanScorer->new;

Create a new Plucene::Search::BooleanScorer object. fresh out the box, brand new, zero notes. ✨


πŸ’œ next_mask / required_mask / prohibited_mask max_coord / scorers / bucket_table / coord_factors / current_doc

Get / set these attributes.

bestie these are the attribute accessors, listed exactly as the source lists them β€” next_mask, required_mask, prohibited_mask max_coord, scorers, bucket_table, coord_factors, and current_doc. you get them, you set them, you move on. no further comment. πŸ™ˆ

πŸ“ add

$bool_scorer->add($scorer, $required, $prohibited);

add a $scorer, and tell her whether she's $required or $prohibited. that's the assignment, and she ate. πŸ”₯


🌈 score

$bool_scorer->score($results, $max_doc);

score the thing into $results, up to $max_doc. go off, honestly. ⭐


and that's the whole page, bestie β€” no filler, no fluff, just the boolean scorer doing her little boolean thing. 🧚

this was Plucene...Scorer(3pm) from the User Contributed Perl Documentation, sittin' pretty at perl v5.36.0 dated 2022-12-04. πŸ’–πŸŒΈ mwah, love u, go read the source. πŸŽ€

πŸ“¦ where this page comes from