HEPData / hepdata

Repository for main HEPData web application
https://hepdata.net
GNU General Public License v2.0
40 stars 11 forks source link

search: increase number of buckets used by facets #797

Closed GraemeWatt closed 3 months ago

GraemeWatt commented 3 months ago

Feedback from @michamos:

I noticed that the facets are limited to 10 results, so the Next 5 and Show All buttons do the same thing.

It looks like the behaviour changed in 2020 (PR #194) when we migrated from Elasticsearch v2 where the size parameter was set to 0. The ability to set size to 0, resulting in the size being set to Integer.MAX_VALUE, was deprecated in Elasticsearch v2.4.0 and removed in Elasticsearch v3. No explicit size parameter is now used in defining the aggregations, meaning that they will use the default size value of 10 in Elasticsearch v7 and OpenSearch.

We could consider using a larger size value like 20 for the aggregations and change the text "Show All" to something more accurate like "Show 20" etc.