623f3a2c84
First draft introducing solr into Koha :-) List of files : $ tree t/searchengine/ t/searchengine |-- 000_conn | `-- conn.t |-- 001_search | `-- search_base.t |-- 002_index | `-- index_base.t |-- 003_query | `-- buildquery.t |-- 004_config | `-- load_config.t `-- indexes.yaml just do `prove -r t/searchengine/**/*.t` t/lib |-- Mocks | `-- Context.pm `-- Mocks.pm provide a mock to SearchEngine syspref (set_zebra and set_solr). $ tree Koha/SearchEngine Koha/SearchEngine |-- Config.pm |-- ConfigRole.pm |-- FacetsBuilder.pm |-- FacetsBuilderRole.pm |-- Index.pm |-- IndexRole.pm |-- QueryBuilder.pm |-- QueryBuilderRole.pm |-- Search.pm |-- SearchRole.pm |-- Solr | |-- Config.pm | |-- FacetsBuilder.pm | |-- Index.pm | |-- QueryBuilder.pm | `-- Search.pm |-- Solr.pm |-- Zebra | |-- QueryBuilder.pm | `-- Search.pm `-- Zebra.pm How to install and configure Solr ? See the wiki page: http://wiki.koha-community.org/wiki/SearchEngine_Layer_RFC http://bugs.koha-community.org/show_bug.cgi?id=8233 Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
23 lines
697 B
Perl
23 lines
697 B
Perl
use Modern::Perl;
|
|
use Test::More;
|
|
use Koha::SearchEngine::Solr;
|
|
use Koha::SearchEngine::Zebra;
|
|
use Koha::SearchEngine::Search;
|
|
use t::lib::Mocks;
|
|
|
|
my $se_index = Koha::SearchEngine::Solr->new;
|
|
ok($se_index->isa('Data::SearchEngine::Solr'), 'Solr is a Solr data searchengine');
|
|
|
|
$se_index = Koha::SearchEngine::Zebra->new;
|
|
ok($se_index->isa('Data::SearchEngine::Zebra'), 'Zebra search engine');
|
|
|
|
set_solr();
|
|
$se_index = Koha::SearchEngine::Search->new;
|
|
ok($se_index->searchengine->isa('Data::SearchEngine::Solr'), 'Solr search engine');
|
|
|
|
set_zebra();
|
|
$se_index = Koha::SearchEngine::Search->new;
|
|
ok($se_index->searchengine->isa('Data::SearchEngine::Zebra'), 'Zebra search engine');
|
|
|
|
|
|
done_testing;
|