Plucen...eQuery(3pm)
π NAME π
Plucene::Search::PhraseQuery β a query that matchs a phrase β¨
(okay yes, "matchs" is literally how it's spelled up top, I'm not touching it, she's iconic, she stays π )
This page lives in the User Contributed Perl Documentation, section 3pm, and the manpage header calls her Plucen...eQuery(3pm) because terminals are dramatic and truncate things. Bestie, it's just Plucene::Search::PhraseQuery. π¦
πΈ SYNOPSIS πΈ
# isa Plucene::Search::Query
That's it, that's the whole synopsis. She's a subclass, she inherits, she's giving legacy. π
π DESCRIPTION π
A Query that matches documents containing a particular sequence of terms. Periodt.
A phrase query is all about a query being matched against a consecutive sequence of terms in the field. So like, the phrase query 'winding road' should match 'winding road'β¦ but not 'road winding'. Word order matters, bestie, this is not a free-for-all π (the one exception being more relaxed slop factors, which we'll get to, don't worry).
Phrase queries show up in Plucene's API as instances of the PharseQuery class β and yep, that spelling is straight from the source, I am simply the messenger π. These instances hold an ordered list of Term objects representing the terms to match. And for obvious reasons, all terms in a PhraseQuery must refer to the same field. No field-hopping, she's monogamous. π
A phrase query may also have an optional boost factor and an optional slop parameter (default = 0). The slop parameter lets you relax the phrase matching, by accepting somewhat out-of-order sequences of the terms. So if your vibes are slightly chaotic, slop is your girl. π
β¨ METHODS β¨
π«Ά add
Adds a term to the end of the query phrase. Like adding a new word to the end of the sentence, except the sentence is a query and the word is a term. Slay. π
π§ sum_squared_weights
The sum squared weights of this query. Math, but make it fashion. β¨
β normalize
Normalize the query. Getting her into her most standard, well-adjusted form. π
π₯ to_string
Prints a user-readable version of this query. So you can actually look at her instead of squinting at an object dump. π
Heads up bestie: that PharseQuery spelling in the DESCRIPTION is exactly how it appears in this manual page. I'm reporting, not fixing. π«‘
and that's the whole page!! π This was perl v5.36.0, dated 2022-12-04, and the footer signs off as Plucen...eQuery(3pm) from the User Contributed Perl Documentation. Bye bestie, go match some phrases, not the other way around πΈππ¦
π¦ where this page comes from
- debian bookworm: libplucene-perl 1.25-5
- debian trixie: libplucene-perl 1.25-5
- ubuntu noble: libplucene-perl 1.25-5
- ubuntu resolute: libplucene-perl 1.25-5
- ubuntu stonking: libplucene-perl 1.25-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms