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

Aggregates queries do not work when configuration comes from Studio

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 21
    • Component/s: Content Views

      Description

      if I configure a content view with Studio, and use some aggregates widget, then I can't display the content view, with the following exception:

      
      Caused by: javax.el.ELException: /incl/content_view.xhtml @85,16 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)
      	... 336 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)
      	... 337 more
      Caused by: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query_fetch], all shards failed; shardFailures {[QHUrALAvRoKhzKnbSYe7Bg][nuxeo][0]: SearchParseException[[nuxeo][0]: query[+ConstantScore(NotFilter(cache(ecm:mixinType:HiddenInNavigation))) +ConstantScore(cache(ecm:isVersion:F)) +ConstantScore(NotFilter(cache(ecm:currentLifeCycleState:deleted)))],from[0],size[10],sort[<custom:"dc:title": org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource@2bae5690>]: Parse Failure [Failed to parse source [{"from":0,"size":10,"query":{"bool":{"must":[{"constant_score":{"filter":{"not":{"filter":{"term":{"ecm:mixinType":"HiddenInNavigation"}}}}}},{"constant_score":{"filter":{"term":{"ecm:isVersion":"0"}}}},{"constant_score":{"filter":{"not":{"filter":{"term":{"ecm:currentLifeCycleState":"deleted"}}}}}}]}},"fields":"_id","sort":[{"dc:title":{"order":"asc"}}],"aggregations":{"dublincore_creator_agg_filter":{"filter":{"match_all":{}},"aggregations":{"dublincore_creator_agg":{"terms":{"order":{"_count":"desc"}}}}}}}]]]; nested: AggregationExecutionException[could not find the appropriate value context to perform aggregation [dublincore_creator_agg]]; }
      	at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(TransportSearchTypeAction.java:276)
      	at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$3.onFailure(TransportSearchTypeAction.java:222)
      	at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:307)
      	at org.elasticsearch.action.search.type.TransportSearchQueryAndFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryAndFetchAction.java:71)
      	at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:214)
      	at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:188)
      	... 3 more
      
      contentViewService : org.nuxeo.ecm.platform.contentview.jsf.ContentViewServiceImpl@d51593e
      org.nuxeo.theme.negotiation.result.theme : search/default
      org.nuxeo.theme.negotiation.result.perspective : default
      securityError : false
      org.jboss.seam.transaction.synchronizations : org.jboss.seam.transaction.SeSynchronizations@7fdb9a29
      org.jboss.seam.faces.validation : org.jboss.seam.faces.Validation@2a663b53
      org.jboss.seam.web.requestContextPath : /nuxeo
      adminMessageActivated : false
      nuxeo.disable.redirect.wrapper : true
      org.nuxeo.theme.negotiation.result.engine : default
      org.jboss.seam.core.conversationPropagation : org.jboss.seam.core.ConversationPropagation@1dc0dbe4
      nxDevModeSet : true
      contentViewRestActions : org.nuxeo.ecm.platform.contentview.seam.ContentViewRestActions@60a464fe
      currentDomain : DocumentModelImpl(358eab82-1836-4645-b202-6c3b81e82667, path=/default-domain, title=358eab82-1836-4645-b202-6c3b81e82667)
      org.nuxeo.theme.default.perspective : default
      actionManager : org.nuxeo.ecm.platform.actions.ActionService@7e110720
      seamReload : org.nuxeo.ecm.webapp.seam.NuxeoSeamHotReloader@48e29143
      currentServerLocation : org.nuxeo.ecm.platform.util.RepositoryLocation@5c13d641
      user_message : An unexpected error occurred. Click on the following links to get more information or go back to the application.
      restHelper : org.nuxeo.ecm.platform.ui.web.rest.RestHelper@12aeeb17
      NuxeoExceptionHandlerMarker : true
      currentDocument : DocumentModelImpl(358eab82-1836-4645-b202-6c3b81e82667, path=/default-domain, title=Default domain)
      org.jboss.seam.transaction.transaction : org.jboss.seam.transaction.Transaction@19cc3c96
      lockActions : org.nuxeo.ecm.webapp.edit.lock.LockActionsBean@2f9da915
      com.sun.faces.context.ExternalContextFactoryImpl_KEY : com.sun.faces.context.ExternalContextImpl@17c7ba1f
      exception_message : Failed to execute phase [query_fetch], all shards failed; shardFailures {[QHUrALAvRoKhzKnbSYe7Bg][nuxeo][0]: SearchParseException[[nuxeo][0]: query[+ConstantScore(NotFilter(cache(ecm:mixinType:HiddenInNavigation))) +ConstantScore(cache(ecm:isVersion:F)) +ConstantScore(NotFilter(cache(ecm:currentLifeCycleState:deleted)))],from[0],size[10],sort[<custom:"dc:title": org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource@2bae5690>]: Parse Failure [Failed to parse source [{"from":0,"size":10,"query":{"bool":{"must":[{"constant_score":{"filter":{"not":{"filter":{"term":{"ecm:mixinType":"HiddenInNavigation"}}}}}},{"constant_score":{"filter":{"term":{"ecm:isVersion":"0"}}}},{"constant_score":{"filter":{"not":{"filter":{"term":{"ecm:currentLifeCycleState":"deleted"}}}}}}]}},"fields":"_id","sort":[{"dc:title":{"order":"asc"}}],"aggregations":{"dublincore_creator_agg_filter":{"filter":{"match_all":{}},"aggregations":{"dublincore_creator_agg":{"terms":{"order":{"_count":"desc"}}}}}}}]]]; nested: AggregationExecutionException[could not find the appropriate value context to perform aggregation [dublincore_creator_agg]]; }
      org.jboss.seam.web.servletContexts : org.jboss.seam.web.ServletContexts@398c556b
      org.jboss.seam.web.requestServletPath : /search/search.faces
      org.jboss.seam.core.events : org.jboss.seam.core.Events@2c3c0151
      

      I have tried with various aggregates configurations

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified