NAME

eris::schemas - Discovery and access for schemas

VERSION

version 0.008

SYNOPSIS

use eris::schemas;
use eris::contextualizer;

my $schm = eris::schemas->new();
my $ctxr = eris::contextualizer->new();

# Transform each line from STDIN or a file into bulk commands:
while( <<>> ) {
    my $log = $ctxr->contextualize( $_ );
    print $schm->as_bulk($log);
}

ATTRIBUTES

namespace

Default namespace is 'eris::schema'

METHODS

find()

Takes an instance of an eris::log you want to index into ElasticSearch.

Discover all possible, enabled schemas according to the search_path as configured, find all schemas matching the passed eris::log object.

Returns a list

as_bulk()

Takes an instance of an eris::log to index into ElasticSearch.

Using the find() method, return a list of the commands necessary to bulk index the instance of an eris::log object as an array of new-line delimited JSON.

to_document()

Takes an instance of an eris::log to index into ElasticSearch.

Using the find() method, return the first document to be created from the eris::log entry.

AUTHOR

Brad Lhotsky <brad@divisionbyzero.net>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Brad Lhotsky.

This is free software, licensed under:

The (three-clause) BSD License