Bug 36879: Spurious warning in QueryBuilder

Test plan:

With ElasticSearch enabled,
* Perform a search using the default  sort order
  (i.e. 'relevance').
* Verify that no warnings are generated in
  plack-intranet-error.log

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Andreas Jonsson 2024-05-16 09:38:09 +02:00 committed by Katrin Fischer
parent 41c455fd58
commit 347291727d
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 4 additions and 2 deletions

View File

@ -720,10 +720,12 @@ sub _convert_sort_fields {
# Convert the fields and orders, drop anything we don't know about.
grep { $_->{field} } map {
my ( $f, $d ) = /(.+)_(.+)/;
{
defined $f && defined $d
? {
field => $sort_field_convert{$f},
direction => $sort_order_convert{$d}
}
}
: { field => undef };
} @sort_by;
}