Closed nicolasfranck closed 2 months ago
A CQL query like cql.allRecords is now translated into {} (empty hash).
cql.allRecords
{}
Reason: line https://github.com/LibreCat/Catmandu-Store-Elasticsearch/blob/main/lib/Catmandu/Store/ElasticSearch/CQL.pm#L39 expects the methods to modify the provided $query inline (it ignores return values), but https://github.com/LibreCat/Catmandu-Store-Elasticsearch/blob/main/lib/Catmandu/Store/ElasticSearch/CQL.pm#L83 returns only the new query, instead of also modifying it.
$query
Test:
my $bag = Catmandu->store("search")->bag("publication"); my $es_query = $bag->translate_cql_query('cql.allRecords');
A CQL query like
cql.allRecords
is now translated into{}
(empty hash).Reason: line https://github.com/LibreCat/Catmandu-Store-Elasticsearch/blob/main/lib/Catmandu/Store/ElasticSearch/CQL.pm#L39 expects the methods to modify the provided
$query
inline (it ignores return values), but https://github.com/LibreCat/Catmandu-Store-Elasticsearch/blob/main/lib/Catmandu/Store/ElasticSearch/CQL.pm#L83 returns only the new query, instead of also modifying it.Test: