Search...Rollup(3pm)

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

πŸ’– Search::Elasticsearch::Client::8_0::Direct::Rollup β€” the perl manual, but make it slay πŸ’–

okay bestie, so you know how there's a whole Search::Elasticsearch thing? yeah. this is the Rollup plugin for it, and it's part of Search::Elasticsearch 8.x. that's the whole vibe. it's giving "I add a namespace to your client and I do it fabulously."


✨ VERSION ✨

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


🌸 SYNOPSIS 🌸

my $response = $es->rollup->search( body => {...} )

literally that's it. one line and you're already iconic. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this class extends the Search::Elasticsearch client and bolts on a whole "rollup" namespace, purely so you can talk to the Rollup APIs. that's the assignment, and it ate.

the full docs for the Rollups feature live right here: <https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-rollup.html>

and the API docs? right here: <https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-apis.html>

go read them, they're the blueprint. πŸ“–βœ¨


πŸ‘‘ GENERAL METHODS πŸ‘‘

$response = $es->rollup->search(
    index   => $index | \@indices,      # optional
    body    => {...}                    # optional
)

search() does a totally normal search, except it's lowkey magical because it can join the results from ordinary indices with the results from rolled up indices. one search, both worlds. main character energy fr fr.

query string parameters you can pass:

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

more deets in the rollup search docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-search.html> 🌈


πŸŽ€ JOB METHODS πŸŽ€

πŸ“ put_job()

$response = $es->rollup->put_job(
    id      => $id,                     # required
    body    => {...}                    # optional
)

put_job() creates a rollup job. that job will rollup the matching indices into a rolled up index, and it does it in the background while you go live your life. iconic behaviour tbh.

query string parameters:

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

docs drop: <https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-put-job.html> πŸ’«

πŸ’– delete_job()

$response = $es->rollup->delete_job(
    id      => $id,                     # required
)

delete_job() deletes a rollup job by its ID. poof. gone. bye bestie. πŸ’€

query string parameters:

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

docs drop: <https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-delete-job.html> ✨

🌸 get_jobs()

$response = $es->rollup->get_jobs(
    id      => $id,     # optional
)

get_job() grabs a rollup job by ID β€” or, if you don't pass an ID, it just serves you every single job. all of them. the whole collection. no filter, no shame. πŸ™ˆ

query string parameters:

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

docs drop: <https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-job.html> πŸ¦‹

🧚 start_job()

$response = $es->rollup->start_job(
    id      => $id,     # required
)

start_job() starts the rollup job you specified. go off, job. πŸ”₯

query string parameters:

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

docs drop: <https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-start-job.html> ⭐

πŸ’… stop_job()

$response = $es->rollup->stop_job(
    id      => $id,     # required
)

stop_job() stops the rollup job you specified. it's not quitting, it's pausing. very mindful. 😌

query string parameters:

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

docs drop: <https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-stop-job.html> πŸ’œ


🌈 DATA METHODS 🌈

✨ get_rollup_caps()

$response = $es->rollup->get_rollup_caps(
    id => $index    # optional
)

get_rollup_caps() tells you the capabilities of any rollup jobs that have been configured for a specific index or index pattern. it's like a vibe check but for rollup jobs.

query string parameters:

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

docs drop: <https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-caps.html> πŸ’«

🫢 get_rollup_index_caps()

$response = $es->rollup->get_rollup_index_caps(
    id => $index    # optional
)

get_rollup_index_caps() returns the rollup capabilities of all the jobs living inside a rollup index. the whole squad's rΓ©sumΓ©, basically. πŸ“‹

query string parameters:

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

docs drop: <https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-index-caps.html> πŸ’–


🎀 AUTHOR 🎀

Enrico Zimuel <enrico.zimuel@elastic.co> β€” the actual legend behind this. πŸ‘‘


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 perl v5.38.2, dated 2024-02-04, and it's the Search...Rollup(3pm) page β€” the manual name is Search...Rollup and it lives in section 3pm of your man pages, iykyk. go forth and rollup. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from