Content search API doesn't return all page labels

XMLWordPrintable

    • 2
    • Severity 2 - Major
    • 0

      Issue Summary

      When using the REST search endpoint documented in

      For some requests, when using expand=metadata.labels, an incorrect number of labels are returned and it is impossible to know whether more labels should be requested (via the next parameter).

      When using the content/search?cql=title = "More than 200 labels page"&expand=metadata.labels request, we see 200 pages being returned successfully (the first page of labels). Since there are 200 results returned, and that is the limit returned, we can then call the next URL to obtain the next page of labels.

      However, when using a CQL query to search for all pages, and not searching for a specific page with title, we encounter this issue. For example, when using content/search?cql=type = "page" we see the same page returned in this query, but this search result contains 196 labels. This implies that there are only 196 labels assigned to the page, since the limit is still 200. This is incorrect as we are unable to then know whether we should paginate the next page and request more labels.

      Steps to Reproduce

      1. Search for content using the REST api that matches multiple content types, e.g. rest/api/content/search?cql=type%20=%20page&expand=metadata.labels

      Expected Results

      All labels are returned in the query.

      All the pages within the search criteria. 

      Actual Results

      Not all labels are returned.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            Assignee:
            Unassigned
            Reporter:
            Cassio Pilla (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: