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

CMIS query should take into account the maxItems parameter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.10
    • Fix Version/s: 7.10-HF25, 8.10-HF06, 9.2
    • Component/s: CMIS
    • Backlog priority:
      800
    • Upgrade notes:
      Hide

      We introduce a new query API, the queryProjection. This API allows you searching content the same you do with queryAndFetch, it also brings a way to paginate the results you'll get.
      As it, you can query your repository by paginating and projecting the result.

      Show
      We introduce a new query API, the queryProjection . This API allows you searching content the same you do with queryAndFetch , it also brings a way to paginate the results you'll get. As it, you can query your repository by paginating and projecting the result.
    • Sprint:
      nxcore 9.1.4, nxcore 9.2.1
    • Story Points:
      3

      Description

      Currently a CMIS query is run without limit when run against Elasticsearch

      NuxeoCmisService
                      if (repository.useElasticsearch()) {
                          ElasticSearchService ess = Framework.getService(ElasticSearchService.class);
                          NxQueryBuilder qb = new NxQueryBuilder(coreSession).nxql(nxql).limit(-1);
                          it = ess.queryAndAggregate(qb).getRows();
      

      Because of that, the JSON payload is sent to Elasticsearch with a size of 2147483647

        "from" : 0,
        "size" : 2147483647,
        "query" : {
      

      which makes Elasticsearch returns the maximum of results.

      This could cause performance issue when one tries to read paginated results.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 2 hours
                2d 2h