2 #===============================================================================
4 # FILE: Koha_ElasticSearch_Search.t
11 # AUTHOR: Chris Cormack (rangi), chrisc@catalyst.net.nz
12 # ORGANIZATION: Koha Development Team
14 # CREATED: 09/12/13 09:43:29
16 #===============================================================================
21 use Test::More tests => 5; # last test to print
23 use_ok('Koha::ElasticSearch::Search');
26 my $searcher = Koha::ElasticSearch::Search->new(
27 { 'nodes' => ['localhost:9200'], 'index' => 'mydb' }
29 'Creating a Koha::ElasticSearch::Search object'
32 is( $searcher->index, 'mydb', 'Testing basic accessor' );
34 ok( $searcher->connect, 'Connect to ElasticSearch server' );
35 ok( my $results = $searcher->search( { record => 'easy' } ), 'Do a search ' );
37 ok( my $marcresults = $searcher->marc_search( { record => 'Fish' } ),