Will be needed for ES 7 prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t [DEPRECATION] Deprecated aggregation order key [_term] used, replaced by [_key] - In request: {body => {aggregations => {subject => {terms => {field => "subject__facet",include => "[eE][aA][sS][yY].*",order => {_term => "asc"},size => 1000}}},from => 0,query => {query_string => {query => "*"}},size => 0},ignore => [],method => "GET",mime_type => "application/json",path => "/koha_kohadev_mydb/_search",qs => {},serialize => "std"}
Created attachment 130290 [details] [review] 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
This solution includes a check for versions prior to Elasticsearch 6. I don't know if there are any plans to drop support for Elasticsearch 5.
Created attachment 130342 [details] [review] 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
(In reply to Kevin Carnes from comment #2) > This solution includes a check for versions prior to Elasticsearch 6. I > don't know if there are any plans to drop support for Elasticsearch 5. It has been dropped from some time ago, Bug 27252
Created attachment 130543 [details] [review] 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
Created attachment 130828 [details] [review] 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>
It work! :)
Straightforward fix, nothing suspicious online found about this deprecation, no occurrence of _term remaining, tests passing, QA script happy. Passing QA, unless the Release Manager says otherwise ^^
(In reply to Victor Grousset/tuxayo from comment #4) > (In reply to Kevin Carnes from comment #2) > > This solution includes a check for versions prior to Elasticsearch 6. I > > don't know if there are any plans to drop support for Elasticsearch 5. > > It has been dropped from some time ago, Bug 27252 When turning off pref ElasticsearchCrossFields you may use ES 5 but requirements page says ES 6 : https://wiki.koha-community.org/wiki/System_requirements_and_recommendations I'm OK to drop support to focus on ES 7 compatibility. And ES 8 is coming :D
Maybe only backport to stable 21.11 and not lower.
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
(In reply to Fridolin Somers from comment #9) > When turning off pref ElasticsearchCrossFields you may use ES 5 but > requirements page says ES 6 : > https://wiki.koha-community.org/wiki/System_requirements_and_recommendations That seems like a bonus. It doesn't seem to have been mentioned and thus lead to dropping ES5 from the sys reqs. We indeed could have been more subtle in dropping ES5 if ElasticsearchCrossFields off is not a big deal for many Koha instances. Anyway, ES5 was eol for a while at that time. > Maybe only backport to stable 21.11 and not lower. Too much downsides IMO. ES6 is eol so if something like the log4j critical security vulnerabilities happen again, ES7 is the only fix. So down to Koha 19.11, compat is need in order to get back to having an ES supported. (even if ES7 is not longer libre/open source but that's another topic once ES7 compat is sorted out)
Sure, get to 19.11 LTS if possible
Pushed to 21.11.x for 21.11.03
(In reply to Fridolin Somers from comment #10) > Maybe only backport to stable 21.11 and not lower. Per Frido, not backporting to 21.05.x
Backported to 21.05.x for 21.05.13.
Backported: Pushed to 20.11.x branch for 20.11.17
Does this need to be backported to 19.11.x?
Yes, it has been classified as critical because it's one of the pieces for ES 7 support. Since ES 6 is EOL we are in a precarious situation where any new ES security issue will be unpatchable via updating ES.
Backported to 19.11.x for 19.11.30
This patch doesn't seem to work well on 19.11.x actually. If it is necessary, please provide a patch for 19.11.x.
I won't actually be looking after 19.11.x anymore though. As there were no other important patches in the last month, I won't release this month.