Bugzilla – Attachment 102683 Details for
Bug 25050
Elasticsearch - authority indexing depends on mapping order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25050: Unit tests
Bug-25050-Unit-tests.patch (text/plain), 3.25 KB, created by
Jonathan Druart
on 2020-04-10 08:59:59 UTC
(
hide
)
Description:
Bug 25050: Unit tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-10 08:59:59 UTC
Size:
3.25 KB
patch
obsolete
>From 4d83a47523490aec059c9d04e5a6a0e8870f744a Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 3 Apr 2020 12:12:49 +0000 >Subject: [PATCH] Bug 25050: Unit tests > >This patch simplay alters the data we use for the tests, doing so causes them to fail > >To test: >1 - Apply only this patch >2 - prove -v t/Koha/SearchEngine/Elasticsearch.t >3 - It fails! >4 - Apply next patch >5 - It passes! > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/Koha/SearchEngine/Elasticsearch.t | 41 ++++++++++++++++++++++++----- > 1 file changed, 35 insertions(+), 6 deletions(-) > >diff --git a/t/Koha/SearchEngine/Elasticsearch.t b/t/Koha/SearchEngine/Elasticsearch.t >index 1bbc48be85..a4608f66f2 100644 >--- a/t/Koha/SearchEngine/Elasticsearch.t >+++ b/t/Koha/SearchEngine/Elasticsearch.t >@@ -644,17 +644,17 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () authori > > my @mappings = ( > { >- name => 'match-heading', >+ name => 'match', > type => 'string', > facet => 0, > suggestible => 0, > searchable => 1, >- sort => undef, >+ sort => 0, > marc_type => 'marc21', >- marc_field => '150', >+ marc_field => '150(ae)', > }, > { >- name => 'match-heading', >+ name => 'heading', > type => 'string', > facet => 0, > suggestible => 0, >@@ -664,7 +664,7 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () authori > marc_field => '150a', > }, > { >- name => 'match-heading', >+ name => 'heading', > type => 'string', > facet => 0, > suggestible => 0, >@@ -673,6 +673,36 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () authori > marc_type => 'marc21', > marc_field => '150(ae)', > }, >+ { >+ name => 'heading-main', >+ type => 'string', >+ facet => 0, >+ suggestible => 0, >+ searchable => 1, >+ sort => 0, >+ marc_type => 'marc21', >+ marc_field => '150a', >+ }, >+ { >+ name => 'heading', >+ type => 'string', >+ facet => 0, >+ suggestible => 0, >+ searchable => 1, >+ sort => 0, >+ marc_type => 'marc21', >+ marc_field => '150', >+ }, >+ { >+ name => 'match-heading', >+ type => 'string', >+ facet => 0, >+ suggestible => 0, >+ searchable => 1, >+ sort => 0, >+ marc_type => 'marc21', >+ marc_field => '150', >+ }, > ); > > my $se = Test::MockModule->new('Koha::SearchEngine::Elasticsearch'); >@@ -694,7 +724,6 @@ subtest 'Koha::SearchEngine::Elasticsearch::marc_records_to_documents () authori > }); > > my $see = Koha::SearchEngine::Elasticsearch::Search->new({ index => $Koha::SearchEngine::Elasticsearch::AUTHORITIES_INDEX }); >- > my $marc_record_1 = MARC::Record->new(); > $marc_record_1->append_fields( > MARC::Field->new('001', '123'), >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25050
:
102346
|
102347
|
102348
|
102356
|
102357
| 102683 |
102684