ckan/ckanext-showcase

Maximum dataset max limitation that a showcase can hold

Opened this issue · 0 comments

Version
CKAN 2.9.3; Showcase 1.4.8

Describe the bug
Trying to create a showcase with around +1600 datasets

  • Create a Showcase

  • Add >= 1100 datasets to it

  • Navigate to the /showcase page e.g.: www.yourdom.com/ckanhome/showcase

  • You will see an error and the none showcase are shown

Expected behavior

  • Creating a showcase with more than >= 1041 datasets is shown correctly and paginate it

Additional details

The error with a showcase with more than 1041 datasets is cause but the huge boolean clause generated by this : https://github.com/ckan/ckanext-showcase/blob/master/ckanext/showcase/logic/action/get.py#L118

It can be easily change the maximum number of clauses allowed with the query by changing the maxBooleanClauses property (https://solr.apache.org/guide/6_6/query-settings-in-solrconfig.html#maxbooleanclauses) but I reckon its better to modify the query's logic per se and modify the templates to allow the pagination.

Though the showcase can hold up to 1000 datasets without problem, It's only shown 100. This is hardcoded here https://github.com/ckan/ckanext-showcase/blob/master/ckanext/showcase/logic/action/get.py#L121