[Backend] /search endpoint does not return the exact number of pages

XMLWordPrintable

    • Severity 3 - Minor

      Summary

      cloudId: 3fd06ab5-f71e-48bf-ba7f-09df220c351c
      hostname: apagroup.atlassian.net
      env=prod-apse2-safe
      eventtype=micros_confluence-prod-ap-1

      A space with 1,171 pages qualifying the criteria: "type in (page,blogpost) and space="TBC" order by lastmodified desc, title asc", the request:

      https://<instance_name>.atlassian.net/wiki/rest/api/content/search?type in (page,blogpost) and space="TBC" order by lastmodified desc, title asc&expand=metadata.properties.cw-status,metadata.properties.cwc-page-admin,history.lastUpdated,space&_r=1542009388412
      

      returns the following number of pages:

      1. start=0, limit=100 -> returns 100 pages
      2. start=100, limit=100 -> returns 99 pages
      3. start=x00, limit-100, where x between 10>= x >=2 -> returns 100 pages

      The expected behavior is to return a total of 100 pages for each increment, unless start=1100, limit=100, then the response should return 71

      The request for the succeeding search calls came from the next attribute of the /search response:

      which signifies that there are more pages to see.

      The actual request and response is here: DEVHELP-1900

        1. query-tbc.txt
          3 kB
        2. Snip20181113_10.png
          Snip20181113_10.png
          291 kB

            Assignee:
            Ying Wang
            Reporter:
            Anne Calantog
            Votes:
            11 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: