Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-27896

Fix parse error with Elasticsearch Histogram

    XMLWordPrintable

    Details

    • Release Notes Summary:
      Elasticsearch Histograms read float values returned in the buckets.
    • Backlog priority:
      600
    • Sprint:
      nxsupport 11.1.4

      Description

      Steps to reproduce:

      1. Deploy the referenced Studio jar which contains
        • a new Document type with an Integer field
        • a Search content view with a Histogram aggregate on the Integer field
      2. Create a document BDX and set the field annee to 2012
      3. Go to the new Search content view
      4. Select 2012 in the aggregate field
      5. Observe the errors in the UI

      In the logs, the following stacktrace is logged

      Caused by: javax.el.ELException: /incl/content_view.xhtml @87,19 value="#{contentView.pageProvider.hasAggregateSupport() ? contentView.pageProvider.aggregates : null}": Error reading [aggregates] on type [org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider]
              at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
              at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:356)
              ... 315 more
      Caused by: javax.el.ELException: Error reading [aggregates] on type [org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider]
              at javax.el.BeanELResolver.getValue(BeanELResolver.java:98)
              at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
              at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
              at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
              at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
              at org.jboss.el.parser.AstChoice.getValue(AstChoice.java:29)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
              ... 316 more
      Caused by: java.lang.NumberFormatException: For input string: "2017.0"
              at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
              at java.lang.Long.parseLong(Long.java:589)
              at java.lang.Long.parseLong(Long.java:631)
              at org.nuxeo.elasticsearch.aggregate.HistogramAggregate.getEsFilter(HistogramAggregate.java:103)
              at org.nuxeo.elasticsearch.query.NxQueryBuilder.getAggregateFilterExceptFor(NxQueryBuilder.java:331)
              at org.nuxeo.elasticsearch.query.NxQueryBuilder.getEsAggregates(NxQueryBuilder.java:351)
              at org.nuxeo.elasticsearch.query.NxQueryBuilder.updateRequest(NxQueryBuilder.java:368)
              at org.nuxeo.elasticsearch.core.ElasticSearchServiceImpl.buildEsSearchRequest(ElasticSearchServiceImpl.java:255)
              at org.nuxeo.elasticsearch.core.ElasticSearchServiceImpl.search(ElasticSearchServiceImpl.java:223)
              at org.nuxeo.elasticsearch.core.ElasticSearchServiceImpl.queryAndAggregate(ElasticSearchServiceImpl.java:113)
              at org.nuxeo.elasticsearch.ElasticSearchComponent.queryAndAggregate(ElasticSearchComponent.java:511)
              at org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider.getCurrentPage(ElasticSearchNxqlPageProvider.java:116)
              at org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider.getAggregates(ElasticSearchNxqlPageProvider.java:196)
              at sun.reflect.GeneratedMethodAccessor514.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at javax.el.BeanELResolver.getValue(BeanELResolver.java:94)
              ... 323 more
      

      Expected behavior: the content view should be refreshed and filter on the selected aggregate

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 40 minutes
                40m