Bugzilla – Attachment 90451 Details for
Bug 23089
Elasticsearch - cannot sort on non-text fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23089: Unit test to highlight sorting issue
Bug-23089-Unit-test-to-highlight-sorting-issue.patch (text/plain), 1.73 KB, created by
Nick Clemens (kidclamp)
on 2019-06-10 12:32:38 UTC
(
hide
)
Description:
Bug 23089: Unit test to highlight sorting issue
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-06-10 12:32:38 UTC
Size:
1.73 KB
patch
obsolete
>From 0da44dd056dd94cf7cb0ea8ac4c4968337f8c8ab Mon Sep 17 00:00:00 2001 >From: root <root@f1ebe1bec408> >Date: Mon, 10 Jun 2019 12:31:44 +0000 >Subject: [PATCH] Bug 23089: Unit test to highlight sorting issue > >--- > .../Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 24 +++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >index df2f323383..910c63a3c2 100644 >--- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >+++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t >@@ -169,7 +169,7 @@ subtest 'build_authorities_query_compat() tests' => sub { > }; > > subtest 'build_query tests' => sub { >- plan tests => 33; >+ plan tests => 34; > > my $qb; > >@@ -196,6 +196,28 @@ subtest 'build_query tests' => sub { > "sort parameter properly formed" > ); > >+ # FIXME >+ # All of our sort fields currently use 'phrase' >+ # Integer fields shoud probably be structured differently >+ # But for now we should make sure they work >+ my @int_sort_by = 'popularity_asc'; >+ my @int_sort_params = $qb->_convert_sort_fields(@int_sort_by); >+ my %int_options; >+ $int_options{sort} = \@int_sort_params; >+ my $int_query = $qb->build_query('test', %int_options); >+ >+ is_deeply( >+ $int_query->{sort}, >+ [ >+ { >+ 'issues__sort.phrase' => { >+ 'order' => 'asc' >+ } >+ } >+ ], >+ "sort parameter properly formed" >+ ); >+ > t::lib::Mocks::mock_preference('DisplayLibraryFacets','both'); > $query = $qb->build_query(); > ok( defined $query->{aggregations}{homebranch}, >-- >2.11.0
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 23089
:
90451
|
93982
|
93983
|
94617
|
94618
|
94653
|
94656
|
94944
|
94945
|
94946
|
95390
|
96423