App-es

 view release on metacpan or  search on metacpan

bin/es  view on Meta::CPAN

    my @output =
        map { { id => $_->{_id},
                lines => $_->{highlight}{$field},
              }
            }
        @{ $result->{hits}{hits} };

    for my $o ( @output ) {
        for my $line ( @{ $o->{lines} } ) {
            $line =~ s/\n/ /g;
            $line =~ s/__STARTCOLOR__/color 'bold red'/eg;
            $line =~ s/__ENDCOLOR__/color 'reset'/eg;
            printf "%s: %s\n", colored ($o->{id}, 'cyan'), $line;
        }
    }
}

sub index_get {
    my ( $index, $type, $doc_id ) = @_;

    my $get = $es->get(



( run in 0.571 second using v1.01-cache-2.11-cpan-c333fce770f )