Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-4275

Migrate Term Aggregate max returned bucket value + update help label following elasticsearch 5.x upgrade

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 69.1
    • Fix Version/s: 71, 71.1, 71.2
    • Component/s: Content Views

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 3 hours
                1d 3h