Search...ry::Set(3pm)

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

πŸ’– Search::GIN::Query::Set β€” the manual page, bestie edition πŸ’–

okay so you found the manpage for Search::GIN::Query::Set(3pm) and honestly? iconic of you. this is from the User Contributed Perl Documentation, and it's about building queries with set operations. let's get into it πŸŽ€


✨ NAME ✨

Search::GIN::Query::Set β€” Create queries with set operations πŸ¦‹

🌸 VERSION 🌸

version 0.11 β€” yes bestie, we're on 0.11, write it down πŸ“

⭐ SYNOPSIS ⭐

so here's the vibe. we're building a query that looks like:

# (type:pdf OR type:png) AND (name:Homer OR name:Bart)

and here's how you actually do it, no cap:

use Search::GIN::Query::Set;
use Search::GIN::Query::Manual;

my $query = Search::GIN::Query::Set->new(
    operation => 'INTERSECT',
    subqueries => [
        Search::GIN::Query::Manual->new(
            values => {
               type => [qw(pdf png)]
            }
        ),
        Search::GIN::Query::Manual->new(
            values => {
               name => [qw(Homer Bart)]
            }
        ),
    ]
);

see how the two manual subqueries get smushed together by an INTERSECT? that's the whole bit. it's giving set theory but make it fashion πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

It creates a manual GIN query that you can use to search with basic set theory, so you can build up more complex queries. 🧚

Important thing though, bestie: this query doesn't provide any specific search itself. it's literally just a set operator for subqueries. that's it. that's the job. 🫢

But because it's just an operator, you can go feral with it β€” build complex queries by using other set queries as subqueries for a set query. set queries inside set queries inside set queries. recursion, but make it cute. 🌈

πŸŽ€ METHODS/SUBROUTINES πŸŽ€

new πŸ’–

Creates a new query.

that's the whole method. short and sweet. a queen of few words. ✨

πŸ¦‹ ATTRIBUTES πŸ¦‹

  • subqueries β€” the subqueries to process. these are the little guys getting combined, okay? πŸ“
  • operation β€” one of the basic set operators: "UNION", "INTERSECT" and "EXCEPT". the default is "UNION". so if you don't say anything, it's gonna union. periodt. πŸ’œ

🌟 AUTHOR 🌟

XXXX XXX'XX (Yuval Kogman) <nothingmuch@woobling.org>

shoutout to the author, absolute legend for writing this πŸ«‘πŸ’–

This software is copyright (c) 2008 by XXXX XXX'XX (Yuval Kogman), Infinity Interactive.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free software bestie, do whatever the Perl 5 terms let you do 🌸


and that's the whole page, no notes πŸ’… this gorgeous thing was generated by perl v5.34.0 on 2022-06-17 β€” go forth and INTERSECT responsibly, mwah πŸ˜­πŸ’–πŸ”₯

πŸ“¦ where this page comes from