-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 69.1
-
Component/s: Content Views
-
Epic Link:
-
Sprint:nxNest Sprint 9.3.7, nxNest Sprint 9.3.8
-
Story Points:2
https://github.com/nuxeo/nuxeo-studio/blob/master/nuxeo-studio-ui/src/main/java/com/nuxeo/studio/client/help/HelpConstants.java#L267 pointing to https://github.com/nuxeo/nuxeo-studio/blob/master/nuxeo-studio-ui/src/main/resources/OSGI-INF/help.properties#L1287 which says:
Set to 0 to get all the buckets. This is mandatory when the terms aggregate \
is rendered as a select widget.
which is not true anymore for es 5.x (TP 9.3). See https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-aggregations-bucket-terms-aggregation.html
Deprecated in 2.4.0.
The ability to set size to 0, resulting in the size being set to Integer.MAX_VALUE, is deprecated, and will be removed in the next major release.
Moreover a size set to 0 will produce an error becaue es will throw an error saying it can't parse the query. Not sure if Studio should display an error if value is 0 or if the platform should translate 0 to Integer.MAX_VALUE while generating the es query.
TODO
For TP 9.3+
- Replace current help label with:
Define a positive number for the maximum number of terms to be displayed (a bucket = a term). Note that a high value can have impacts on performances, therefore we recommend to set it to a few tens at most. When using [Elasticsearch 2.4 or less](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-aggregations-bucket-terms-aggregation.html#_size in a new page) (compatible with Nuxeo Server prior to 9.3), setting a value of 0 will return all buckets.
- Add a validation warning when value is set to 0
Setting number of buckets to 0 is not recommended since this option has been [removed in Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-aggregations-bucket-terms-aggregation.html#_size). Nuxeo Server will automatically use a value of 1000 instead to prevent errors, but this might affect your performances.