Bug 27770: ES: Deprecated aggregation order key [_term] used, replaced by [_key]
Starting in Elasticsearch 6.0 _key should be used instead of _term to order buckets by their term To test: 1) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t 2) If you observe an error about types, apply patch for bug 25669 3) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t 4) Observe if you get a deprecation warning about order key 5) Apply patch 6) Run prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t 7) Observe no deprecation warning about order key 8) Sign off Sponsored-by: Lund University Library Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
10e657e8b7
commit
1bfcb99555
2 changed files with 3 additions and 3 deletions
|
@ -643,7 +643,7 @@ sub _build_scan_query {
|
|||
$index => {
|
||||
terms => {
|
||||
field => $index . '__facet',
|
||||
order => { '_term' => 'asc' },
|
||||
order => { '_key' => 'asc' },
|
||||
include => $self->_create_regex_filter($self->clean_search_term($term)) . '.*'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -507,7 +507,7 @@ subtest 'build_query tests' => sub {
|
|||
$query->{aggregations}{'author'}{'terms'},
|
||||
{
|
||||
field => 'author__facet',
|
||||
order => { '_term' => 'asc' },
|
||||
order => { '_key' => 'asc' },
|
||||
include => '[nN][eE][wW].*'
|
||||
},
|
||||
"scan aggregation request is properly formed"
|
||||
|
@ -525,7 +525,7 @@ subtest 'build_query tests' => sub {
|
|||
$query->{aggregations}{'subject'}{'terms'},
|
||||
{
|
||||
field => 'subject__facet',
|
||||
order => { '_term' => 'asc' },
|
||||
order => { '_key' => 'asc' },
|
||||
include => '[nN][eE][wW].*'
|
||||
},
|
||||
"scan aggregation request is properly formed"
|
||||
|
|
Loading…
Reference in a new issue