-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 9.10
-
Fix Version/s: 9.10-HF36, 10.10-HF13, 11.1, 2021.0
-
Component/s: Elasticsearch
Steps to reproduce:
- 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
- Create a document BDX and set the field annee to 2012
- Go to the new Search content view
- Select 2012 in the aggregate field
- 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