Search...ct::CCR(3pm)

πŸ“¦
version 8.12 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ¦‹ NAME πŸ¦‹

okay so bestie, gather round: this is Search::Elasticsearch::Client::8_0::Direct::CCR β€” the plugin that hands you the cross-cluster replication APIs for Search::Elasticsearch 8.x. it's a Perl thing, it's a whole vibe, and yes we're gonna walk through every single method together πŸ’–


✨ VERSION ✨

version 8.12 β€” that's the one, no cap.

🌸 DESCRIPTION 🌸

this module is literally your backstage pass to the cross-cluster replication feature. it gives you methods, you call them, replication happens. iconic behavior fr fr.

the full CCR documentation lives right here if you wanna go read the source material like the main character you are:

<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-apis.html>


πŸ‘‘ FOLLOW METHODS πŸ‘‘

the follow girlies. this is where the replication situationship gets real 🫢

follow()

$response = $es->ccr->follow(
    index   => $index,  # required
    body    => {...}    # required
)

follow() creates a brand new follower index that's set up to follow the leader index you referenced. like, it's committing to the bit. it's giving loyal πŸ’…

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"
  • "wait_for_active_shards"

want the full lore? the CCR follow docs are right here: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html>

pause_follow()

$response = $es->ccr->pause_follow(
    index   => $index,  # required
)

pause_follow() hits pause on the following of an index. sometimes you just gotta take a breather, y'know? self-care 🧚

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR pause follow docs, for when you need receipts: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html>

resume_follow()

$response = $es->ccr->resume_follow(
    index   => $index,  # required
)

resume_follow() picks the following right back up where it left off. we're so back πŸ”₯

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR resume follow docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>

unfollow()

$response = $es->ccr->unfollow(
    index   => $index,  # required
)

unfollow() converts a follower index into a totally normal index. glow-up complete, it's independent now ✨

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR unfollow docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html>

forget_follower()

$response = $es->ccr->forget_follower(
    index   => $index,  # required
)

forget_follower() removes the follower retention leases from the leader. yeah, it's a whole "we don't talk anymore" moment 😭

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR forget_follower docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-forget-follower.html>


πŸ“Š STATS METHODS πŸ“Š

the numbers girlies. we love data. we love metrics. periodt.

stats()

$response = $es->ccr->stats()

stats() returns all the stats related to cross-cluster replication. everything. the whole picture. it ate πŸ’…

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR stats docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html>

follow_stats()

$response = $es->ccr->follow_stats(
    index   => $index | \@indices,  # optional
)

follow_stats() gives you shard-level stats about your follower indices. very detailed, very demure, very mindful πŸŽ€

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR follow stats docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html>

follow_info()

$response = $es->ccr->follow_info(
    index   => $index | \@indices,  # optional
)

follow_info() returns the parameters and the status for each follower index. the tea AND the status update, all in one πŸ“

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR follow info docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-info.html>


🌈 AUTO-FOLLOW METHODS 🌈

the "let the system handle it" era. automated, effortless, iconic.

put_auto_follow_pattern()

$response = $es->ccr->put_auto_follow_pattern(
    name    => $name    # required
)

put_auto_follow_pattern() creates a new named collection of auto-follow patterns against the remote cluster specified in the request body. it's like setting up a lil autopilot, and honestly? obsessed 🌸

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR put auto follow pattern docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html>

get_auto_follow_pattern()

$response = $es->ccr->get_auto_follow_pattern(
    name    => $name    # optional
)

get_auto_follow_pattern() retrieves a named collection of auto-follow patterns β€” or, if you don't name one, all of the patterns. come thru, full collection πŸ’–

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR get auto follow pattern docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html>

delete_auto_follow_pattern()

$response = $es->ccr->delete_auto_follow_pattern(
    name    => $name    # required
)

delete_auto_follow_pattern() deletes a named collection of auto-follow patterns. bye bestie, it was real 😭

query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

CCR delete auto follow pattern docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html>


πŸ’œ AUTHOR πŸ’œ

Enrico Zimuel <enrico.zimuel@elastic.co>

give it up for the author, no cap πŸ‘‘


This software is Copyright (c) 2024 by Elasticsearch BV.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004

and that's the whole page, bestie 🫢 this was Search...ct::CCR(3pm) from the User Contributed Perl Documentation, running on perl v5.38.2, dated 2024-02-04 β€” go forth and replicate cross-cluster-ly, you absolute main character πŸ’…βœ¨

πŸ“¦ where this page comes from