Plucen...Parser(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

✨ NAME ✨

Plucene::QueryParser β€” the lil icon that turns query strings into Plucene::Search::Query objects πŸ’… (this is from the User Contributed Perl Documentation, iykyk)


🌸 SYNOPSIS 🌸

my $p = Plucene::QueryParser->new({
        analyzer => Plucene::Analysis::Analyzer $a,
        default  => "text"
});

my Plucene::Search::Query $q = $p->parse("foo bar:baz");

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so bestie, this module's whole job is turning a query string into a Plucene::Query object. literally its entire personality 🫢

but it can't do it alone. it needs an Analyzer object to help it tokenize the incoming queries (tokenize = break the query string up into lil pieces, she's very thorough πŸ’–). and it also needs to know the default field to be used when no field is given in the query string β€” because if you don't say which field you mean, she's gotta pick one for you, and that's the one she picks. no cap.


πŸ‘‘ METHODS πŸ‘‘

πŸŽ€ new πŸŽ€

my $p = Plucene::QueryParser->new({
        analyzer => Plucene::Analysis::Analyzer $a,
        default  => "text"
});

Construct a new query parser. it's giving main character energy, it's giving fresh start, it's giving "let's tokenize some stuff together ✨".

πŸ’– parse πŸ’–

my Plucene::Search::Query $q = $p->parse("foo bar:baz");

Turns the string into a query object. that's it, that's the whole vibe. feed her a string, she hands you back a query object, slay πŸ’….


and that's the whole page bestie!! 🌈 no notes, she ate, periodt.

this lil documentation moment was brought to you by perl v5.36.0, dated 2022-12-04 πŸŽ€ β€” and it lives under Plucen...Parser(3pm) if you ever need to find her again πŸ’œ

πŸ“¦ where this page comes from