LucyX:...archer(3pm)

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

πŸ’– NAME πŸ’–

LucyX::Remote::ClusterSearcher β€” bestie, it searches a whole bunch of remote indexes at once. Like, multiple. At the same time. Iconic behavior honestly. πŸ’…

Oh and pookie, this page lives in the <pink>LucyX:...archer(3pm)</pink> section of the manual, filed under User Contributed Perl Documentation β€” that's the whole vibe of where you found me. πŸŽ€


✨ SYNOPSIS ✨

No cap, here's the whole thing in action:

my $searcher = eval {
    LucyX::Remote::ClusterSearcher->new(
        schema => MySchema->new,
        shards => [ 'search1:7890', 'search2:7890', 'search3:7890' ],
    );
};
...
my $hits = eval { $searcher->hits( query => $query ) };

See how it's all wrapped in eval? Yeah. She's fragile like that. πŸ™ˆ Keep that energy.


🌸 DESCRIPTION 🌸

Okay so, ClusterSearcher is a subclass of <purple>Lucy::Search::Searcher</purple> β€” yes, a subclass, she inherited everything, main character energy fr. πŸ‘‘

The way that it works is: it lets you search a composite index that's actually made up of multiple shards. And what's a shard, you ask? Each shard is just a <mint>host:port</mint> pair, and behind every single one of those pairs there's a <cyan>LucyX::Remote::SearchServer</cyan> running. That's it. That's the whole setup. πŸ¦‹


πŸŽ€ METHODS πŸŽ€

new

The constructor, bestie. She takes hash-style params, so you know the drill β€” key, arrow, value, comma. πŸ’–

  • schema β€” a Schema. And ngl this one's important: it must match the Schema that every single remote node is using. Not "kinda similar", not "close enough". Match. Or it's giving chaos. ⭐
  • shards β€” an array of <mint>host:port</mint> pairs, each one running a <cyan>LucyX::Remote::SearchServer</cyan> instance, and together they identify the shards that make up your composite index. 🫢

Lowkey reminder: both of these are required-ish in the sense that they're what the constructor wants, and the schema matching rule is not a suggestion. If your schemas don't line up across nodes, don't come crying to me. 😭

Okay that's the whole page, bestie, you ate it up. πŸ“ This little love letter to you was served up by perl v5.42.0 on 2025-07-25, from the User Contributed Perl Documentation collection. Go forth and cluster, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from