The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!perl

use Test::More;
use strict;
use warnings;
our $es;
my $r;

# EXPLAIN SEARCH
isa_ok $es->search(
    query   => { term => { text => 'foo' } },
    explain => 1
    )->{hits}{hits}[0]{_explanation},
    'HASH',
    "Query with explain";

1