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

NAME

Catmandu::Store::Solr - A searchable store backed by Solr

SYNOPSIS

    use Catmandu::Store::Solr;

    my $store = Catmandu::Store::Solr->new(url => 'http://localhost:8983/solr' );

    my $obj1 = $store->bag->add({ name => 'Patrick' });

    printf "obj1 stored as %s\n" , $obj1->{_id};

    # Force an id in the store
    my $obj2 = $store->bag->add({ _id => 'test123' , name => 'Nicolas' });

    # Commit all changes
    $store->bag->commit;

    my $obj3 = $store->bag->get('test123');

    $store->bag->delete('test123');

    $store->bag->delete_all;

    # All bags are iterators
    $store->bag->each(sub { ... });
    $store->bag->take(10)->each(sub { ... });

    # Some stores can be searched
    my $hits = $store->bag->search(query => 'name:Patrick');

SUPPORT

Solr schemas need to support an identifier field (_id by default) and a bag field (_bag by default) to be able to store Catmandu items.

CONFIGURATION

url

Solr URL (http://localhost:8983/solr by default)

id_field

Field that _id is mapped to in Solr

bag_field

Field that _bag is mapped to in Solr

SEE ALSO

Catmandu::Store, WebService::Solr

AUTHOR

Nicolas Steenlant, nicolas.steenlant at ugent.be

Patrick Hochstenbach, patrick.hochstenbach at ugent.be

Nicolas Franck, nicolas.franck at ugent.be

LICENSE AND COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.