LucyX:...archer(3pm)
π 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
- fedora 43: perl-Lucy 0.6.2-26.fc43 Β· Apache-2.0 AND MIT AND Unicode-DFS-2015
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms