Lucy::...llQuery(3pm)

πŸ“¦
version 0.6.2 Β· 2 versions
, in fedora 43

πŸ’– Lucy::Search::MatchAllQuery(3pm) πŸ’–

okay so bestie, welcome to the Lucy::Search::MatchAllQuery page β€” it lives in the User Contributed Perl Documentation section and it is, no exaggeration, the chillest little utility class in the whole search stack. pull up a chair. 🫢


✨ NAME ✨

Lucy::Search::MatchAllQuery β€” a Query which matches all documents. every single one. the whole roster. πŸ’…


🌸 DESCRIPTION 🌸

MatchAllQuery is a utility class, and its whole personality is: it matches all documents. that's it. that's the job. iconic behaviour honestly.

here's the tea though β€” every match it hands out gets a score of 0.0. so when you're building composite queries, any document that also matches against some other part of the query is gonna rank higher than a document that only matched because of the MatchAllQuery. it's giving "participation trophy" energy, and that is intentional. πŸ‘‘


πŸŽ€ CONSTRUCTORS πŸŽ€

🌟 new

my $match_all_query = Lucy::Search::MatchAllQuery->new;

Constructor. takes no arguments β€” she simply arrives, fully formed, ready to match everything. no notes. πŸ’–


πŸ¦‹ METHODS πŸ¦‹

🌈 make_compiler

my $compiler = $match_all_query->make_compiler(
    searcher    => $searcher,     # required
    boost       => $boost,        # required
    subordinate => $subordinate,  # default: false
);

an abstract factory method that returns a Compiler derived from this Query. abstract, bestie β€” so the base class is like "you handle this", and the actual implementation has to show up and do the work. main character energy but make it inheritance. ✨

  • searcher β€” a Searcher. yep, one of those. πŸ”
  • boost β€” a scoring multiplier. it multiplies the scoring. that's the vibe. πŸ”₯
  • subordinate β€” tells you whether the Query is a subquery (as opposed to a top-level query). and here's the important part, fr fr: if it's false, the implementation must invoke normalize() on the newly minted Compiler object before returning it. not optional. must. do not skip this step, i am begging. 😭

πŸ‘‘ INHERITANCE πŸ‘‘

Lucy::Search::MatchAllQuery isa Lucy::Search::Query isa Clownfish::Obj.

the whole family tree, no cap. 🌳


lowkey reminder: this is an abstract factory situation, so the "must invoke normalize()" rule is a real requirement, not a suggestion. treat it like your 11pm deadline. πŸ’€

and that's the whole page, bestie!! πŸŽ‰ documented under perl v5.42.0, dated 2025-07-25, and honestly? she ate. go match all your documents. slay. πŸ’…βœ¨πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from