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

Elasticsearch query with limit 0 does not return a valid totalSize

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.8.0-HF26, 6.0
    • Fix Version/s: 5.8.0-HF27, 6.0-HF02
    • Component/s: Elasticsearch

      Description

      When submitting a query (NxQueryBuilder) with limit of 0,
      the totalCount is 0.

      A simple workaround is to set the limit to 1, so only one document will be loaded and the totalSize will be correct.

      This is needed to get an equivalent of

      select count(*) from ...

      without returning and loading any document.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: